ocrd_models.ocrd_xml_base module

Base class for XML documents loaded from either content or filename.

class ocrd_models.ocrd_xml_base.OcrdXmlDocument(filename=None, content=None)[source]

Bases: object

Base class for XML documents loaded from either content or filename.

Parameters
  • filename (string) –

  • content (string) –

to_xml(xmllint=False)[source]

Serialize all properties as pretty-printed XML

Parameters

xmllint (boolean) – Format with xmllint in addition to pretty-printing