How can you parse a huge XML file that's having various elements (i.e. not same element repeated multiple times).
Example:
<stuff>
<header>...</header>
<item>...</item>
...
<item>...</item>
<something>...</sometihng>
</stuff>
I want to write a script in Go that would allow me to split this file in multiple smaller files with specific amount of tags per file. All examples on how to parse XML with Go seems to rely on knowing the elements that you have in the file.
Can the file be parsed without knowing that? Something like for each element in XML no matter what element is there (header, item, something, etc...)