Antoine Pitrou added the comment:

> Antoine, is there a reason why you had to add this _setevents() method
> to the XMLParser, instead of making the IncrementalParser an
> IncrementalTreeBuilder?

The point is not to build a tree of potentially unbounded size (think XMPP). 
The point is to yield events in a non-blocking way (iterparse() is blocking, 
which makes it useless for non-blocking applications).

An IncrementalTreeBuilder wouldn't have much point IMO. It is not more costly 
to accumulate a string and parse it at the end, than to progressively build a 
growing XML tree.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17741>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to