Matthew Thorley wrote:
> Greetings, perhaps someone can explain this. I get to different styles 
> of formatting for xmla and xmlb when I do the following:
> <snip>
> Is that because the some_file.xml is already nicely formatted? I thought 
> that the formatting was ignored when creating new elements.

ElementTree is preserving the whitespace of the original.
> 
> Is their a function to 'pretty print' an element? 

AFAIK this is not supported in ElementTree. I hacked my own by modifying 
ElementTree._write(); it wasn't too hard to make a version that suited my 
purposes.

Kent
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to