Skip to content

Introduction to the XML pre-defined object

Overview

The XML predefined object is a wrapper based on a c++ library.

The XML predefined object can be used in the following functions, which are executed after disambiguation:

It is used to navigate a Studio project taxonomy file.

To navigate the hierarchical structure of an XML document, the XML object tracks the current position that defines the action context of the methods within the document.

The current position consists of:

  • The parent position.
  • The main position.
  • The child position.

In the following XML structure you can see an example of the current position pointers.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DOMAINTREE>
    <DOMAIN NAME="1" LABEL="one">                           <-- Parent position
        <DOMAIN NAME="1.1" LABEL="one.one">                 <-- Main position
            <DOMAIN NAME="1.1.1" LABEL="one.one.one"/>      <-- Child position
            <DOMAIN NAME="1.1.2" LABEL="one.one.two"/>
        </DOMAIN>
    </DOMAIN>
    <DOMAIN NAME="2" LABEL="two"/>
    <DOMAIN NAME="3" LABEL="three"/>
</DOMAINTREE>

There is no current position when loading a document. It changes after calling the methods that move the position, for example findChildElem(xmlID, childElementName) or findElem(xmlID, elementName).

XML object methods

The functionalities of the XML object are exposed through its methods: