vendredi 23 juillet 2021

We have so many XML files. We will validate, parse and compare these files with existing data. How to develop this feature with patterns

Like I explain at the header. I will give you the happy path step by step following:

XML's are so different but all of them contains what data we needs. And we take the data what we need.

  1. Upload 1 XML file with xmlType(let's we say AType) via API.
  2. Convert multipart.File to the xlsx.File.
  3. Chose correct path with the switch case and xmlType.
  4. Call validation function ValidateATypeFile(). (Check the headers that we need)
  5. Call xml reading function ReadATypeFile(). (Collect the data that we need)
  6. Call existing data from database.
  7. Compare with xml data and existing data.
  8. Find changes and return a JSON list which includes existing version and new version.

Which patterns fit this feature? Beside the patterns do you suggest any other approach this kind of feature.

Aucun commentaire:

Enregistrer un commentaire