Re: Remove whitespaces and line breaks in a XML file

2011-02-11 Thread Sven
On 2011-02-07 18:46:17 -0500, Josh English said: 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. lxml, which the code is using, already has a pretty_print feature acc

Re: Remove whitespaces and line breaks in a XML file

2011-02-09 Thread Jean-Michel Pichavant
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.mini

RE: Remove whitespaces and line breaks in a XML file

2011-02-08 Thread David Vicente
-list@python.org CC: python-list@python.org Asunto: Re: Remove whitespaces and line breaks in a XML file 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 -- http

Re: Remove whitespaces and line breaks in a XML file

2011-02-07 Thread Josh English
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 -- http://mail.python.org/mailman/listinfo/python-list

Re: Remove whitespaces and line breaks in a XML file

2011-02-07 Thread Stefan Behnel
David Vicente, 07.02.2011 18:45: I´m parsing an xml file with xml.etree. It works correctly, but I have a problem with the text attribute of the elements which should be empty. For example, in this case: Ken The text element of “book” should be empty, but it returns me so