I have PY 2.7 installed and when I try to write my XML to a file :
import xml.etree.ElementTree as xml
tree = xml.ElementTree(root)
with open(filename, 'w') as fh:
tree.write(fh)
The above code works and the file is populated with the XML elements. Unfortunately its printing everything in one line. I have seen many options online printing in more human readible format. I tried a few with no success. Could someone propose what I can do in 2.7 try ?
Thanks, Newbie