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

roland rehmnert report at bugs.python.org
Mon Oct 13 10:50:25 CEST 2008


roland rehmnert <roland.rehmnert at ericsson.com> added the comment:

We had to be careful how we should handle this.

http://effbot.org/zone/element-iterparse.htm

A note on this site says following : 

Note: The tree builder and the event generator are not necessarily
synchronized; the latter usually lags behind a bit. This means that when
you get a “start” event for an element, the builder may already have
filled that element with content. You cannot rely on this, though — a
“start” event can only be used to inspect the attributes, not the
element content. For more details, see this
<ref>http://mail.python.org/pipermail/xml-sig/2005-January/010838.html</ref>.

I do understand that it might be so that elem.text is undefined at start.

I have not investigated how iterparse handle this situation over boundaries:

<a> text <b> text </b> text </a>

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


More information about the Python-bugs-list mailing list