Automation Engine Script Guide > Ordered by Function > Read or Modify Objects > XML_OPEN

XML_OPEN

Script Function: Opens an XML document for processing purposes.

Syntax

XML_OPEN (DOCU, [Object Name], @Documentation)

XML_OPEN (REPORT, [RunID], Report)

XML_OPEN (STRING, String)

Syntax

Description/Format

Source

Source of the XML document.
Format: AE name, script literal or script variable

Allowed values: DOCU, REPORT, and STRING

DOCU - Structured documentation.
REPORT - Report of an SAP jobAn Automation Engine object type for a process that runs on a target system..
STRING - XML in the form of a string.

For structured documentations

Object Name

Name of the objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task.
Format: scriptA particular Automation Engine object type. literal or script variableA placeholder for a value within a script.

This parameter is optional if this is the own object's tab.

Documentation

Name of the documentation tab with a preceding "@".
Format: script literal or script variable

For reports

RunIDShort for "run number". It is a number that provides unique information about a task's execution. The RunID can include 7 to 10 digits. It is assigned by the Automation Engine component .

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.
Format: script literal or script variable

This parameter is optional if the report of the own object is concerned.

Report

Type of XML report

For strings:  
String

String that contains the XML.
Format: script variable or script literal


Return code

Reference to the XML document.

Comments

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.

Examples

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

:XML_CLOSE

Closes XML documents.

Script Elements - Read or Modify Objects

Structured Documentation

www.w3c.org/TR/xmlbase

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