Vishal Bhargava wrote: > I have an XML format that I have created using data collected from > Different dictionaries. I am changing the file extension of this XML file > to something else, e.g. .wml extension, so when I open this file using > notepad the whole file is totally flat, that means the all the data that I > have in the XML file whose extension I just changed gets printed out into 1 > single line. Is there no way that we can take care of formatting the file, > during the building of the XML file using the Element Tree Module. Thanks > for all the help.
the file is perfectly valid XML, even if it doesn't contain any extra newlines. if you want it to print more nicely, you can set the "tail" attribute to "\n" for relevant elements. or you can run something like the snipped in this post http://article.gmane.org/gmane.comp.python.xml/3741 before you save the file. </F> _______________________________________________ XML-SIG maillist - XML-SIG@python.org http://mail.python.org/mailman/listinfo/xml-sig