While editing xml file in python using lxml it seems the etree.write() operation fixes the formatting of the file.
Code:
def update_file(xmlfile, xpath, da