comet.xmltree

Reading XML files or strings for XML queries.

Methods

comet.xmltree.open(path, useTreeBuffer=True)

Open an XML free from a file

Parameters
  • path (str) –

    The full path to the XML file.

    In XML offline, SOAP and AEM® connections, XML configuration data such as panelstatements.xml and actions.xml can also be read here.

  • useTreeBuffer (bool) –

    Reading XML files can be time-consuming.

    Read files can therefore be buffered.

    Buffered XML data is deleted when the connection is disconnected.

    • True

      Buffer the input

    • False:

      Don’t buffer the input

Returns

The tree loaded from the file

Return type

CXMLTree

Raises
Available

CScript

xmlquery::parse

comet.xmltree.parse(input)

Parse an XML Tree from an input string

Parameters

input (str) – The input XML string

Returns

The tree loaded from the string

Return type

CXMLTree

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input is empty

    • When the input could not be parsed

  • CometError – On internal error