Automic Workload Automation

 View Only

Working with XML in the Automation Engine 

Dec 03, 2018 11:43 AM

There are two ways of storing XML in the Automation Engine:

  • XML VARA objects
  • Structured documentation tabs


XML VARA objects

XML VARA objects were introduced in v11. Each XML VARA can contain one or more XML documents. Each XML document is assigned to a key, similar to the way up to 5 values can be assigned to a key in a static VARA object.


Structured documentation tabs

Every object in the AE can have one or more documentation (DOCU) tabs. A documentation tab may contain either unstructured or structured documentation. Unstructured documentation is stored as plain text. Structured documentation is stored as XML.

(Documentation tabs can be defined in UC_OBJECT_DOCU.)


Working with XML

The AE scripting language includes many functions for working with XML. Using these scripting functions, one can extract or manipulate individual parts of the XML. The general approach is:

  1. Open the XML (from a file, a string stored in a variable, an XML VARA, or a structured documentation tab)
  2. Read and/or manipulate the XML.
  3. Close and/or save the XML.


Before you can use the Script Elements for XML Elements, you must first get an XML DOM for the XML you wish to work with. Once you have finished working with the XML DOM, you can choose to save the (perhaps modified) XML. The approach you’ll need to use depends on where the source XML resides and what you wish to do with the data afterward.

The attached PowerPoint presentation depicts the options for steps 1 and 3. The first slide is included here.



An example is is described below.

  1. Use GET_VAR to read part of an XML VARA object into a variable as a string.
  2. Use XML_OPEN with the STRING parameter to open the XML into an XML DOM.
  3. Use the Script Functions for XML Elements to work directly with the XML DOM, optionally making changes. E.g.,
  4. Use XML_TO_STRING to convert the XML DOM back to a string.
  5. Use :XML_CLOSE to close the XML DOM.
  6. Create a new XML VARA by using CREATE_OBJECT and specifying the object type XML*.
  7. Use :PUT_VAR to write the XML string to the new target XML VARA object.


* Although this capability is not documented, you can use CREATE_OBJECT to create XML VARAs.


See also:

XML_PROCESS_TO_DOM should be able to work with data sequences created by PREP_PROCESS_VAR_XML

How to save changes to XML DOCU tabs? 

XML DOM functions for attributes 


If you would like to contribute to this document, please contact one of the authors.

0 Favorited
1 Files
pptx file
Working with XML in the Automation Engine.pptx   556 KB   1 version
Uploaded - May 29, 2019

Tags and Keywords


Dec 04, 2018 10:19 AM

I attached the PowerPoint presentation I put together to document my findings.

Related Entries and Links

No Related Resource entered.