I have created a basic xml tree using lxml tutorial:
from lxml import etree
root = etree.Element("root")
root.append( etree.Element("child1") )
child2 = etree.SubElement(root, "child2")
child3 = etree.SubElement(root, "child3")
print(etree.tostring(root, pretty_print=True, encoding="UTF-8", xml_declaration=True))
This produces the following:
<?xml version='1.0' encoding='UTF-8'?>
<root>
<child1/>
<child2/>
<child3/>
</root>
My question is, how to produce xml file with double quoted file header, i.e.
<?xml version="1.0" encoding="UTF-8"?>
....