Script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…: Creates an XML document from 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..
XML_PROCESS_TO_DOM(data sequence reference)
Syntax part |
Description/format |
---|---|
Data sequence reference |
Reference to the data sequence that is to be converted into an XML document. |
Return codes |
---|
Reference to the resulting XML document |
There are a number of different script elements available in the Automation EngineThis component drives an Automation Engine system and consists of different types of server processes. to create, process, and fill data sequences. Data sequences whose content displays an XML structure can be converted into an XML document using the XML_PROCESS_TO_DOM scriptA particular Automation Engine object type. element. The document can be processed with script elements for XML processing (script elements whose names begin with XML).
If the data sequence does not contain an XML code, a runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start). error occurs when XML_PROCESS_TO_DOM is executed.
The following example saves the content of an XML fileA format for imports and exports. An XML file contains object structures. as a data sequence. In addition, the data sequence is converted into an XML document and the names of all of the elements and their childA subordinate task (such as a task that runs in a workflow). elements are logged in the activation reportA report provides more detailed information about a task's execution or a component. using a while loop.
:SET &HND# = PREP_PROCESS_FILE(WIN01,"C:\AE\UserInterfaceThis is the Automation Engine's graphical user interface. [Formerly called the "Rich Client", "RichGUI" and "Dialog Client."]\bin\uc4config.xml")
:SET &XML# = XML_PROCESS_TO_DOM(&HND#)
:SET &ELEMENT# = XML_GET_FIRST_CHILD(&XML#)
:WHILE &ELEMENT# <> ""
: SET &NAME# = XML_GET_NODE_NAME(&ELEMENT#)
: P "XML element: &NAME#"
: SET &CHILDS# = XML_GET_CHILD_COUNT(&ELEMENT#)
: IF &CHILDS# > 0
: SET &SUBELEMENT# = XML_GET_FIRST_CHILD(&ELEMENT#)
: WHILE &SUBELEMENT# <> ""
: SET &NAME# = XML_GET_NODE_NAME(&SUBELEMENT#)
: P "XML child element: &NAME#"
: SET &SUBELEMENT# = XML_GET_NEXTSIBLING(&SUBELEMENT#)
: ENDWHILE
: ENDIF
: SET &ELEMENT# = XML_GET_NEXTSIBLING(&ELEMENT#)
:ENDWHILE
Example of the output in the activation report:
2013-11-21 12:17:45 - U0020408 Name: paths
2013-11-21 12:17:45 - U0020408 Child name: docu
2013-11-21 12:17:45 - U0020408 Child name: logging
2013-11-21 12:17:45 - U0020408 Child name: trace
2013-11-21 12:17:45 - U0020408 Child name: tcpip_keepalive
2013-11-21 12:17:45 - U0020408 Child name: tcp_nodelay
2013-11-21 12:17:45 - U0020408 Child name: SendBufferSize
2013-11-21 12:17:45 - U0020408 Child name: RecvBufferSize
2013-11-21 12:17:45 - U0020408 Name: colors
2013-11-21 12:17:45 - U0020408 Child name: color
2013-11-21 12:17:45 - U0020408 Child name: color
2013-11-21 12:17:45 - U0020408 Child name: color
2013-11-21 12:17:45 - U0020408 Child name: color
2013-11-21 12:17:45 - U0020408 Child name: color
2013-11-21 12:17:45 - U0020408 Child name: color
2013-11-21 12:17:45 - U0020408 Child name: color
2013-11-21 12:17:45 - U0020408 Child name: color
2013-11-21 12:17:45 - U0020408 Name: timeout
2013-11-21 12:17:45 - U0020408 Name: connections
2013-11-21 12:17:45 - U0020408 Child name: connection
2013-11-21 12:17:45 - U0020408 Child name: connection
See also:
Script element | Description |
---|---|
XML_DOM_TO_PROCESS | Creates a data sequence from an XML document. |
Script Element – Reading or Modifying Objects
Examples
Determining the Error Message and Number
About the Script
Script Elements – Alphabetical Listing
Script Elements – Ordered by Function
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |