[issue4100] xml.etree.ElementTree does not read xml-text over page bonderies

Fredrik Lundh report at bugs.python.org
Sat Nov 1 19:31:55 CET 2008


Fredrik Lundh <effbot at users.sourceforge.net> added the comment:

Roland's right - "iterparse" only guarantees that it has seen the ">" 
character of a starting tag when it emits a "start" event, so the 
attributes are defined, but the contents of the text and tail attributes 
are undefined at that point.  The same applies to the element children; 
they may or may not be present.

If you need a fully populated element, look for "end" events instead.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4100>
_______________________________________


More information about the Python-bugs-list mailing list