Dan Timoney | b217558 | 2017-03-31 17:47:19 -0400 | [diff] [blame] | 1 | import xml.dom.minidom |
2 | import lxml.etree as etree | ||||
3 | import sys | ||||
4 | |||||
5 | xml_fname=sys.argv[1] | ||||
6 | #xml = xml.dom.minidom.parse(xml_fname) # or xml.dom.minidom.parseString(xml_string) | ||||
7 | #pretty_xml_as_string = xml.toprettyxml() | ||||
8 | #print pretty_xml_as_string | ||||
9 | |||||
10 | x = etree.parse(xml_fname) | ||||
11 | print etree.tostring(x, pretty_print = True) |