You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a very useful tool for an XML file containing homogenous records. However, for XML files that contain various types of records, parsing all the record types requires scanning the file multiple times. For small XML files this is trivial but for larger GB sized XML files this is very slow.
Leveraging what you already have built, could you add a convert_multiple() method that would accept a list of tags and use the output path as the base path with the tag name appended. Something like this:
@inviscid Apologies for the delayed reply. I am afraid adding a function like that to the main library may not really fit into the scope of the project. You can always extend the class and modify its behaviour.
This is a very useful tool for an XML file containing homogenous records. However, for XML files that contain various types of records, parsing all the record types requires scanning the file multiple times. For small XML files this is trivial but for larger GB sized XML files this is very slow.
Leveraging what you already have built, could you add a convert_multiple() method that would accept a list of tags and use the output path as the base path with the tag name appended. Something like this:
converter = xml2csv('some/path/my_xml.xml', 'some/path/my_csv_', encoding='utf8')
converter.convert_multiple(tags=('tag1', 'tag2', 'tag3'))
Resulting in output files like this:
my_csv_tag1.csv
my_csv_tag2.csv
my_csv_tag3.csv
The text was updated successfully, but these errors were encountered: