screaming modems
->
hear them scream
Thursday, March 24, 2005
pretty-printing xml with python
It's pretty easy to do:
import xml.dom.minidom
inf = file('infile.xml')
parser = xml.dom.minidom.parse(inf)
inf.close()
outf = file('outfile.xml', 'w')
outf.write(parser.toprettyxml(indent=' ', newl=''))
outf.close()
1 comment:
Anonymous said...
thanks. really helped.
3:36 AM, January 12, 2008
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
1 comment:
thanks. really helped.
Post a Comment