You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee=Noneclosed_at=<Date2020-08-09.10:52:55.486>created_at=<Date2018-10-18.16:22:21.351>labels= ['expert-XML', 'type-feature', '3.10']
title='Sax parser provides no user access to lexical handlers'updated_at=<Date2020-08-09.10:52:55.486>user='https://github.com/jfgossage'
While working on issues bpo-6686 and bpo-9371 I realized that the solution to both involved the use of Sax lexical handlers. Unfortunately, the Python SAX parser does not expose these handlers to the end user, however, support is available in expatreader.py and pyexpat.c.
What is missing is the LexicalHandler class which works the same way as the ContentHandler does for the more common handlers and provides a subclassable interface for these handlers. This class is present in the Java implementation of SAX2 and was also present in Pyxml.
I have already verified privately that this class works exactly as expected and I am working on a PR which will provide the class along with supporting unit tests that verify that the lexical handlers work.