skip to main
|
skip to sidebar
Linux Info
Information about various Linux / UNIX / OS X topics
Wednesday, March 16, 2011
Pretty Print XML with Python
Pretty Print XML
import xml.dom.minidom
# Read XML from File
xml = xml.dom.minidom.parse(xml_filename)
# Read XML from String
xml = xml.dom.minidom.parseString(xml_string)
xml.toprettyxml()
http://stackoverflow.com/questions/749796/pretty-printing-xml-in-python
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
►
2024
(1)
►
August
(1)
►
2017
(2)
►
November
(1)
►
June
(1)
►
2016
(4)
►
June
(1)
►
March
(3)
►
2015
(15)
►
December
(2)
►
November
(2)
►
August
(1)
►
July
(3)
►
June
(1)
►
May
(3)
►
April
(1)
►
March
(2)
►
2014
(11)
►
September
(7)
►
April
(1)
►
March
(1)
►
January
(2)
►
2013
(17)
►
December
(1)
►
November
(1)
►
October
(1)
►
July
(3)
►
May
(3)
►
April
(2)
►
March
(2)
►
February
(4)
►
2012
(11)
►
November
(1)
►
October
(1)
►
April
(2)
►
March
(5)
►
February
(2)
▼
2011
(26)
►
November
(4)
►
September
(2)
►
August
(1)
►
July
(1)
►
June
(1)
►
May
(3)
►
April
(8)
▼
March
(1)
Pretty Print XML with Python
►
February
(2)
►
January
(3)
►
2010
(30)
►
December
(1)
►
November
(3)
►
October
(3)
►
August
(8)
►
July
(3)
►
June
(8)
►
May
(1)
►
April
(1)
►
February
(1)
►
January
(1)
►
2009
(18)
►
December
(2)
►
October
(4)
►
September
(2)
►
August
(2)
►
July
(1)
►
May
(1)
►
February
(2)
►
January
(4)
►
2008
(12)
►
December
(1)
►
October
(2)
►
September
(1)
►
August
(2)
►
July
(2)
►
June
(1)
►
April
(2)
►
February
(1)
►
2007
(17)
►
November
(2)
►
September
(1)
►
August
(1)
►
April
(4)
►
March
(3)
►
February
(3)
►
January
(3)
►
2006
(16)
►
December
(9)
►
November
(6)
►
April
(1)
►
2005
(3)
►
March
(3)
Links
Joe Jasinski
Google News
Jaz Studios
About Me
Joe Jasinski
View my complete profile
No comments:
Post a Comment