Jan-10-2018, 08:51 PM
(This post was last modified: Jan-10-2018, 08:51 PM by Gribouillis.)
It is not a bug: the documentation says
Obviously, the reason is that the text has not yet been read when the iterative parser emits the start event.
Quote:Note 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.
Obviously, the reason is that the text has not yet been read when the iterative parser emits the start event.