I have this xml from sql, and I want to do the same by python 2.7 and lxml
doc.write('output.xml', xml_declaration=True, encoding='utf-16')
instead of:
outFile = open('output.xml', 'w') doc.write(outFile, xml_declaration=True, encoding='utf-16')