xmlsquad / gsheet-to-xml

Given the url of a Google Sheet, this Symfony Console command fetches the Google Sheet and outputs it in the form of Xml.
Apache License 2.0
3 stars 1 forks source link

Processing multiple files #2

Closed zoka123 closed 6 years ago

zoka123 commented 6 years ago

When processing a single file with multiple tabs, each tab is serialized as a single <Inventory> element.

How should we process multiple files (with potentially multiple tabs)? Should I merge all inventories from all files or create different <Product> node for every file?

forikal-uk commented 6 years ago

There is only ever one <Inventory> element per <Product> element.

Each Google Sheet tab represents one of these: <Product><Inventory>...data here..</Inventory></Product>.

This was not very clear from my example XML so I will update that.

(The word Product is a bit confusing because it really means Instance Of A Client Contract. I will have to arrange for that name to be refactored better. But for now we have to make do with it).

So, when processing a single file with multiple tabs, each tab should be treated as a separate <Product><Inventory> element.

and when processing multiple files (with potentially multiple tabs) each tab should, again, be treated as a separate <Product><Inventory> element.