David Vicente
2011-02-07 17:45:31 UTC
Hi,
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:
<book>
<author>Ken<author>
</book>
The text element of ?book? should be empty, but it returns me some
whitespaces and break lines. I can?t get remove these whitespaces without
remove information.
Some idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110207/3498316f/attachment.html>
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:
<book>
<author>Ken<author>
</book>
The text element of ?book? should be empty, but it returns me some
whitespaces and break lines. I can?t get remove these whitespaces without
remove information.
Some idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110207/3498316f/attachment.html>