LxmlEventHandler¶
- class xsdata.formats.dataclass.parsers.handlers.LxmlEventHandler(parser, clazz)[source]¶
Event handler based on
lxml.etree.iterparse
api.- Parameters
- parse(source)[source]¶
Parse an XML document from a system identifier or an InputSource or directly from an lxml Element or Tree.
When Source is an lxml Element or Tree the handler will switch to the
lxml.etree.iterwalk
api.When source is a system identifier or an InputSource the parser will ignore comments and recover from errors.
When config process_xinclude is enabled the handler will parse the whole document and then walk down the element tree.