xsdata.formats.dataclass.parsers.mixins module¶
-
class
xsdata.formats.dataclass.parsers.mixins.PushParser[source]¶ Bases:
xsdata.formats.bindings.AbstractParserA generic interface for event based content handlers like sax.
- Parameters
config – Parser configuration.
-
abstract
start(queue, qname, attrs, ns_map, objects, clazz)[source]¶ Queue the next xml node for parsing.
-
class
xsdata.formats.dataclass.parsers.mixins.XmlNode[source]¶ Bases:
abc.ABCA generic interface for xml nodes that need to implement the two public methods to be used in an event based parser with start/end element events.
The parser needs to maintain a queue for these nodes and a list of objects that these nodes return.
-
abstract
child(qname, attrs, ns_map, position)[source]¶ Initialize the next child node to be queued, when a new xml element starts.
This entry point is responsible to create the next node type with all the necessary information on how to bind the incoming input data.
-
abstract
-
class
xsdata.formats.dataclass.parsers.mixins.XmlHandler(clazz, parser, queue=<factory>, objects=<factory>)[source]¶ Bases:
objectXml content handler interface.
- Parameters
clazz (
Type) – The Dataclass model to bind the xml document data.parser (
PushParser) – The parser instance to feed events.queue (
List) – The queue list of xml nodes.objects (
List) – Temporary storage for intermediate objects, eg [(qname, object)]
-
clazz: Type¶
-
queue: List¶
-
objects: List¶
-
class
xsdata.formats.dataclass.parsers.mixins.EventsHandler(clazz, parser, queue=<factory>, objects=<factory>)[source]¶ Bases:
xsdata.formats.dataclass.parsers.mixins.XmlHandlerContent handler based on pre-recorded events.
- Parameters
clazz (
Type) –parser (
PushParser) –queue (
List) –objects (
List) –
-
clazz: Type¶
-
queue: List¶
-
objects: List¶