Chinthakayala, Sheshashailavas (sc2914) | d156997 | 2017-08-28 05:25:46 -0900 | [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) |