Script Function: Opens an XML document for processing purposes.
XML_OPEN (DOCU, [Object Name], @Documentation)
XML_OPEN (REPORT, [RunID], Report)
XML_OPEN (STRING, String)
Syntax |
Description/Format |
---|---|
Source |
Source of the XML document. Allowed values: DOCU, REPORT, and STRING DOCU - Structured documentation. |
For structured documentations |
|
Object Name |
Name of the objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task. This parameter is optional if this is the own object's tab. |
Documentation |
Name of the documentation tab with a preceding "@". |
For reports |
|
Run number (RunID) of the taskAn executable object that is running. Tasks are also referred to as activities. whose reportA report provides more detailed information about a task's execution or a component. should be opened. This parameter is optional if the report of the own object is concerned. |
|
Report |
|
For strings: | |
String |
String that contains the XML.
|
Return code |
---|
Reference to the XML document. |
The script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… opens an XML document for processing purposes. This can be the structured documentation or the report of an SAP job.
In order to add further descriptions and explanations, you can use tabs for documentation purposes. You can define them for the individual object types in the variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. UC_OBJECT_DOCU. The structured documentation is a specific type of description which is characterized by a preceding "@". Structured documentation can be processed with specific script elements.
Reports of SAP jobs are stored as XML documents. For XI_GET_CHANNEL, they contain a listShows entities in a grid view of selected communication channels.
The return codeThe value that represents the result of tasks and script functions. of this script function is a handle which refers to the XML document. Some script elements that are used to process the XML document use this handle as a parameter.
You can close the XML document by using XML_CLOSE.
You cannot open more than one XML document at a time.
In previous Automation EngineThis component drives an Automation Engine system and consists of different types of server processes. releases, this script function XML_OPEN_DOCU was renamed to XML_OPEN. You can still use the old notation.
In this example, the Details tab of the object MM.DAY is opened for further processing.
:SET &XMLDOCU# = XML_OPEN(DOCU,"MM.DAY", "@Details")
This example opens an XML document with a string.
:set &ref# = xml_open('STRING','<xmlstring>')
:set &ref# = sys_last_err_nr()
:if &ret > 0
: set &txt# = sys_last_err_ins()
! implement error handling here
:endif
A bad XML string either leads to run time error, or returns a return code which can be read with sys_last_err_nr().
See also:
Script element | Description |
---|---|
Closes XML documents. |
Script Elements - Read or Modify Objects
Sample Collection:
Retrieving Error Message and Number
About Scripts
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 |