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
3:36 AM, January 12, 2008
thanks. really helped.
Reply
Delete
Replies
Reply
Add comment
Load more...
‹
›
Home
View web version
thanks. really helped.
ReplyDelete