I need to parse XML document and then write every node to separate files keeping exact order of attributes. So if i have input file like :
<item a="a" b="b" c="c"/>
<item a="a1" b="b2" c="c3"/>
Output should be 2 files with every item.
Now if xml.dom.minidom is used - attribute order is changed in output( i can get - <item b="b" c="c" **a="a"**/>
)
I found pxdom lib, it keeps order but very-very slow( minidom parsing takes 0.08 sec., pxdom parsing takes 2,5 sec.)
Is there any other python libraries that can keep attributes?
UPD: libarry should also keep upper and lower cases. So "Item" is not equal to "item"