I've got problem with minidom. My code is:
from lxml import etree as ET
from xml.dom import minidom
xml_string = ET.tostring(self.model)
reparsed = minidom.parseString(xml_string)
text = reparsed.toprettyxml(indent=" ")
I'm expecting (and when I try to print xml_string ,there is right argument order)
<def id="A" set="normal"/>
but minidom does changes to:
<def set="normal" id="A"/>
This is lxml tree code
temp = ET.SubElement(self.model,"def")
temp.set("id", A)
temp.set("set", "normal")