XmlHandler

class xsdata.formats.dataclass.parsers.mixins.XmlHandler(parser, clazz, queue=<factory>, objects=<factory>)[source]

Abstract content handler.

Parameters
  • parser (PushParser) – The parser instance to feed with events

  • clazz (Optional[Type]) – The target binding model. If None the parser will auto locate it from the active xml context instance

  • queue (List) – The XmlNode queue

  • objects (List) – The list of intermediate parsed objects, eg [(qname, object)]

parse(source)[source]

Parse an XML document from a system identifier or an InputSource.

Parameters

source (Any) –

Return type

Any

start_ns_bulk(ns_map)[source]

Bulk start-ns event handler that returns a normalized copy of the prefix-URI map merged with the parent element map.

Parameters

ns_map (Dict) – Namespace prefix-URI map

Return type

Dict