XML VARA Objects

XML VARA objects let you store complex data as XML structures. This data can then be referenced and used in PromptSet objects, in Script objects, and other script contexts system-wide. XML VARA objects can have any number of keys. The value of each key is a structured XML.

XML VARA objects allow you to retrieve a list of Variable object values. Use the PREP_PROCESS_VAR and PREP_PROCESS_VAR_XML script function to access all or several particular entries of a variable. This prepares the processing of a data sequence.

Defining XML VARA Objects

An XML VARA object definition is made up of the following pages:

Important Considerations

Defining the Variables Page

On this page you define the keys and values of the XML VARA object.

Example:

An XML VARA object called SRV.VARA.XML has a key called SERVER NAMES with the following value:

<SERVERS>

    <SERVER NAME="TestServer1">

        <IP>192.168.0.1</IP>

    </SERVER>

    <SERVER NAME="TestServer2">

        <IP>192.168.0.2</IP>

    </SERVER>

</SERVERS>

To read the single values from the XML, you use the GET_VAR script function with XQUERY expressions:

:set &name# = GET_VAR('HAM.VARA.XML','TESTSERVER','/SERVERS/SERVER[1]/@NAME')

:set &ip# = GET_VAR('HAM.VARA.XML','TESTSERVER','/SERVERS/SERVER[1]/IP/text()')

:p &name# &ip#

The output is as follows:

U00020408 TestServer1 192.168.0.1

Defining the Attributes Page

  1. Define the XML Variable Settings. They are identical to those of STATIC VARA objects. For a detailed description, see In the Variable Settings section, specify the following:.
  2. Define the Script Access.
  3. If you are logged in to Client 0, an additional section is available. For more information, see Client 0 VARA Objects in Other Clients.

Script Elements for XML VARA Objects

The following script elements are available for STATIC and XML variables:

Usage

Watch this video to learn how to use STATIC and XML VARA objects to configure Workflows: Watch the Video: Configuring Workflows with VARA objects

See also: