xsdata.formats.dataclass.serializers.writers.native module

class xsdata.formats.dataclass.serializers.writers.native.XmlEventWriter(output, encoding='UTF-8', pretty_print=False, ns_map=<factory>)[source]

Bases: xsdata.formats.dataclass.serializers.mixins.XmlWriter

Parameters
handler: xml.sax.saxutils.XMLGenerator
depth: int = 0
ended: int = 0
start_tag(qname)[source]

Start tag notification receiver.

The receiver will flush any pending start element create new namespaces context and queue the current tag for generation.

Parameters

qname (str) –

end_tag(qname)[source]

End tag notification receiver.

The receiver will flush if pending the start of the element, end the element, its tail content and its namespaces prefix mapping and current context.

Parameters

qname (str) –