Automation Engine Script Guide > Ordered by Function > Data Sequences > XML_DOM_TO_PROCESS

XML_DOM_TO_PROCESS

Script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…: Creates a data sequenceAn internal listing of Console outputs or lines of Variable objects, etc. The lines of a data sequence can be accessed by using a PROCESS loop or the script element GET_PROCESS_LINE. The script elements PREP_PROCESS* generate data sequences. based on a specific XML document.

Syntax

XML_DOM_TO_PROCESS(Reference)

Syntax part

Description/format

Reference

Reference to an XML document that is to be converted into a data sequence.
Format script variable



Return codes

Reference of the data sequence

Notes

The scriptA particular Automation Engine object type. function stores the content of an XML document in a data sequence, which can then be further processed using the appropriate script elements. The reference to the data sequence created is returned as a return codeThe value that represents the result of tasks and script functions..

The data sequence creates a line for each element of the transferred XML document.

There may also be a reference to a specific XML element, which was selected with the XML_SELECT_NODE script element, for example.

Examples

The following example illustrates the functionality of the  XML_DOM_TO_PROCESS script function. In the first step, the structured Documentation tab of the own  objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task is opened as an XML document and the reference is stored in a script variableA placeholder for a value within a script.. Next, a data sequence is created and filled with the content of the XML document. Finally, the data sequence is processed line by line and the individual lines are written in the activation log.

:SET &XML# XML_OPEN(DOCU,,"@XMLDocu")

:SET &HND#XML_DOM_TO_PROCESS(&XML#)

:PROCESS &HND#
SET &XMLLINE# = GET_PROCESS_LINE(&HND#)
: PRINT "&XMLLINE#"

:ENDPROCESS

The content of the Documentation tab is output line by line in XML format in the activation log:

2013-11-21 14:03:58 - U0020408 <Content>

2013-11-21 14:03:58 - U0020408 <Element1>

2013-11-21 14:03:58 - U0020408 <SubElement1/>

2013-11-21 14:03:58 - U0020408 </Element1>

2013-11-21 14:03:58 - U0020408 <Element2/>

2013-11-21 14:03:58 - U0020408 </Content>

 

See also:

Script element Description
XML_PROCESS_TO_DOM Creates an XML document from a data sequence.

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH