ooodev.adapter.xml.dom.document_builder_partial module

class ooodev.adapter.xml.dom.document_builder_partial.DocumentBuilderPartial(component, interface=com.sun.star.xml.dom.XDocumentBuilder)[source]

Bases: object

Partial class for XDocumentBuilder.

Parameters:
  • component (XDocumentBuilder) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.xml.dom.XDocumentBuilder)[source]

Constructor

Parameters:
  • component (XDocumentBuilder) – UNO Component that implements com.sun.star.xml.dom.XDocumentBuilder interface.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XDocumentBuilder.

Return type:

None

get_dom_implementation()[source]

Obtain an instance of a DOMImplementation object.

Return type:

XDOMImplementation

is_namespace_aware()[source]

Indicates whether or not this parser is configured to understand namespaces.

Return type:

bool

is_validating()[source]

Indicates whether or not this parser is configured to validate XML documents.

Return type:

bool

new_document()[source]

Obtain a new instance of a DOM Document object to build a DOM tree with.

Return type:

XDocument

parse(in_stream)[source]

Parse the content of the given InputStream as an XML document and return a new DOM Document object.

Raises:
  • com.sun.star.xml.sax.SAXExceptionSAXException

  • com.sun.star.io.IOExceptionIOException

Return type:

XDocument

Parameters:

in_stream (com.sun.star.io.XInputStream) –

parse_uri(uri)[source]

Parse the content of the given URI as an XML document and return a new DOM Document object.

Raises:
  • com.sun.star.xml.sax.SAXExceptionSAXException

  • com.sun.star.io.IOExceptionIOException

Return type:

XDocument

Parameters:

uri (str) –

set_entity_resolver(er)[source]

Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed.

Return type:

None

Parameters:

er (com.sun.star.xml.sax.XEntityResolver) –

set_error_handler(eh)[source]

Specify the ErrorHandler to be used to report errors present in the XML document to be parsed.

Return type:

None

Parameters:

eh (com.sun.star.xml.sax.XErrorHandler) –