[issue14007] xml.etree.ElementTree - XMLParser and TreeBuilder's doctype() method missing

Florent Xicluna report at bugs.python.org
Sun Feb 26 22:49:37 CET 2012


Florent Xicluna <florent.xicluna at gmail.com> added the comment:

Two other differences:
 * the C TreeBuilder has an undocumented and unused method "xml"
 * if you omit one of the TreeBuilder method (start(), end(), data(), close()) on you custom TreeBuilder implementation, the C XMLParser works fine, but the Python XMLParser raises an attribute error.

And I confirm that if you implement the "doctype()" method on a custom TreeBuilder object, the C XMLParser ignores it, while the Python version works fine.


I propose:
 - to drop the undocumented, empty "TreeBuilder().xml" method.
 - to relax the Python XMLParser, in order to accept incomplete TreeBuilder implementation (like the C version)
 - to implement the "doctype()" handler in the C XMLParser (this needs some work)

----------

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


More information about the Python-bugs-list mailing list