xml.Document¶
The xml.Document class represents a single XML document.
-
class
xml.Document¶ Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a
NotImplementedErrorexception.
Attributes¶
-
xml.Document.document¶ Returns the
xml.DocumentInformationItemrepresenting this document.
-
xml.Document.document_element¶ Returns the
xml.ElementInformationItemrepresenting the document information item for this document.
-
xml.Document.schema_location_attributes¶ Returns an iterator of
xml.AttributeInformationItemobjects objects which represent all xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes in this instance.
-
xml.Document.source_document¶ Returns the source
xml.Documentin case that the document was constructed by an Inline XBRL transformation.
-
xml.Document.unmapped_uri¶ Attempts to return the original URI of the document before any catalog mappings were applied.
-
xml.Document.uri¶ Returns the URI of the document (after any catalog mappings) that was used to actually open the document and read its content.
Methods¶
-
xml.Document.find_element(id)¶ Returns an
xml.ElementInformationItemobject which represent the element with the given ID or at the given XPointer location. Returns None if no appropriate element can be found.
-
xml.Document.serialize(pretty_print=True, add_unspecified_attributes=False)¶ Returns a string with the serialized document. Setting the option pretty_print will insert appropriate indendation and newlines after each XML element. Setting the option add_unspecified_attributes will add any missing attributes that have a default value in the DTD/XSD Schema.
Special methods¶
__bool__, __eq__, __ge__, __gt__, __le__, __lt__, __ne__