Re: ElementTree write creates large one line XML file ....

2010-05-28 Thread robert somerville
Thanks Robert Kern : "prettyprint" ; indent() does the trick ;-) >ElementTree writes exactly what you tell it to. In XML, whitespace is >significant. If you want newlines and/or indentation to make it pretty-looking, >then you need to add those to your elements. > >Fredrik provides an example f

Re: ElementTree write creates large one line XML file ....

2010-05-27 Thread Sebastian Bassi
On Thu, May 27, 2010 at 9:13 PM, Robert Kern wrote: > ElementTree writes exactly what you tell it to. In XML, whitespace is > significant. If you want newlines and/or indentation to make it > pretty-looking, then you need to add those to your elements. This is not always true. Let me quote an XML

Re: ElementTree write creates large one line XML file ....

2010-05-27 Thread Robert Kern
On 5/27/10 7:52 PM, robert somerville wrote: Hi I am using Ubuntu 9.10 and Python 2.6.4 .. when I create an ElementTree object and the write it out using: xml.etree.ElementTree.write() , I get one single long single line files, instead of something that looks reasonable , what gives ??? (and

ElementTree write creates large one line XML file ....

2010-05-27 Thread robert somerville
Hi I am using Ubuntu 9.10 and Python 2.6.4 .. when I create an ElementTree object and the write it out using: xml.etree.ElementTree.write() , I get one single long single line files, instead of something that looks reasonable , what gives ??? (and is it important ??) eg: I get : OneTwo instea