I use the python, lxml package. I am wondering if someone knows how to output an element with fixed specified locations for the attributes.
MMain = etree.Element('DockingConfig', FormatVersion="8", InsideFill="True", InnerMinimum="20, 20", SavedAt="1/27/2014 2:01:47 PM")
outfile.write(etree.tostring(MMain, pretty_print=True))
if I output this, it will sort out the attributes alphabetically, which is not what i want as an output.
My second question is that, how can I generate my output file with encoding of "Encode in UCS-2 Little edition". This makes it to be "utf-16"
print(etree.tostring(MMain, pretty_print=True, encoding="utf-16"))
Thanks