LxmlSaxHandler¶
-
class
xsdata.formats.dataclass.parsers.handlers.
LxmlSaxHandler
(parser, clazz, queue=<factory>, objects=<factory>)[source]¶ Sax content handler based on
lxml.etree.XMLParser
api.- Parameters
parser (
PushParser
) – The parser instance to feed with eventsclazz (
Optional
[Type
]) – The target binding model. If None the parser will auto locate it from the active xml context instancequeue (
List
) – The XmlNode queueobjects (
List
) – The list of intermediate parsed objects, eg [(qname, object)]
-
parse
(source)[source]¶ Parse an XML document from a system identifier or an InputSource.
The xml parser will ignore comments, recover from errors and clean duplicate namespace prefixes.
-
start
(qname, attrs, ns_map)[source]¶ Start element notification receiver.
The receiver will flush any previous active element, append a new data frame to collect data content for the next active element and notify the main parser to prepare for next binding instruction.
-
end
(qname)[source]¶ End element notification receiver.
The receiver will flush any previous active element and set the next element to be flushed.
- Parameters
qname (
str
) – Qualified name
-
close
()[source]¶ Close document notification receiver.
The receiver will flush any previous active element and return the first item in the objects stack.
- Return type