I am not able to use the pretty_print argument to print the xml. Any idea what could be wrong ?
I am attaching the code sample as well.
Thanks
import xml.etree.cElementTree as etree
import os
def main():
root = etree.Element("root")
Series = etree.SubElement(root, "Element")
SeriesID = etree.SubElement(Series, "Index")
SeriesID.text = "80379"
#print str(etree)
#print(etree.tostring(root, pretty_print=True))
print(etree.tostring(root))
if __name__ == "__main__":
main()
xml.etree.ElementTree.tostring()does not have apretty_printparameter.lxml.etree.tostring()on the other hand has apretty_printparameter.