Remove whitespaces and line breaks in a XML file

Jean-Michel Pichavant jeanmichel at sequans.com
Wed Feb 9 17:19:01 CET 2011


Josh English wrote:
> I found the code posted at 
>
> http://infix.se/2007/02/06/gentlemen-indent-your-xml
>
> quite helpful in turning my xml into human-readable structures. It works
> best for XML-Data.
>
> Josh
>   
It's done in one line with

http://docs.python.org/library/xml.dom.minidom.html#xml.dom.minidom.Node.writexml

JM



More information about the Python-list mailing list