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, cache_flag=False)[source]

Bases: object

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

Parameters:
  • filename (string)

  • content (string)

  • cache_flag (bool)

to_xml(xmllint=False)[source]

Serialize all properties as pretty-printed XML

Parameters:

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