[issue18902] Make ET event handling more modular to allow custom targets for the non-blocking parser

Stefan Behnel report at bugs.python.org
Tue Sep 3 11:21:13 CEST 2013


Stefan Behnel added the comment:

> This would make it possible to layer XMLPullParser on top of the stock XMLParser coupled with a special target that collects "events" from the callback calls.

Given that we have an XMLPullParser now, I think we should not clutter the API with more classes that do not add anything more than making other classes redundant. So, -1 on adding a special target that collects events. Anyone who wants to use that feature can just use the XMLPullParser.

In the Python implementation of that parser, custom targets can already be allowed right now. Only the C implementation prevents it currently (AFAICT) as it has its own built-in TreeBuilder target.

Therefore, +1 for the general cleanup to properly allow arbitrary targets as backend.

Also, +1 for allowing start-ns and end-ns event callbacks on parser targets, although that's a different feature entirely.

----------
nosy: +scoder

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


More information about the Python-bugs-list mailing list