Fromatting an xml file
sir_alex
chimaera29 at libero.it
Thu Feb 2 04:57:05 EST 2006
Hi! I have a little problem writing xml files formatted in a way like
the following:
<rootnode>
<node>bla</node>
<node>bla</node>
</rootnode>
Every new node element should have a tabulation before it, but when I
use xml.dom.minidom I use writexml, which considers as a new node also
the text (in my little example, "bla" phrases), so the best result I
achieved has been the following
<rootnode>
<node>
bla
</node>
</rootnode>
but I don't want the text to be written on newlines... is there a good
solution? Thanks!
More information about the Python-list
mailing list