0

I am using Python to pick a specific set of values from my XML:

children = root[2].getchildren()
for child in children:
    ET.dump(child)

Once I use this I get a print of exactly what I need from my XML. I can also change the root number to access different data. I want to export this value as a new separate xml, however when I use :

tree.write('new.xml')

It exports the entire XML, as before. It is not just the value I specified above, value I selected.

4

0 回答 0