Introduction to the XML object
XML predefined object is a wrapper based on a c++ library.
XML object can be used in the
SCRIPT attribute and also in the following functions, which are executed after disambiguation:
It is used to navigate a Studio project taxonomy file.
Navigate the document levels
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
XML object methods
The functionalities of the
XML object are exposed through its methods:
savePos(xmlID, posLabel) and restorePos(xmlID, posLabel)