SQR Commands to Create XML Output

The following table describes the SQR commands to generate XML output:

SQR Command

Syntax

Description

DEFINE_XML_TEMPLATE

DEFINE_XML_TEMPLATEtemplate name’ ‘name space’ ‘include nature’ ‘element name1include nature’ ‘element name2’ ‘...’ ‘include nature’ ‘element name3END_XML_TEMPLATE

Defines the structure of the XML.

ADD_DATA_TO_XML_RECORD

ADD_DATA_TO_XML_RECORDtemplate name’ ‘element name’ ‘value

Adds data to XML template to create an XML-RECORD before writing the XML file.

ADD_CHILD_TO_XML_RECORD

ADD_CHILD_TO_XML_RECORD ‘template name’ ‘element name

Adds child record to XML template to create an XML-RECORD in a tree structure before it is pushed to the XML file.

ADD_ATTRIBUTE_TO_XML_RECORD

ADD_ATTRIBUTE_TO_XML_RECORD ‘template name’ ‘element name’ ‘attribute name'attribute value

Adds an attribute to any record or element that has data.

WRITE_TO_XML_FILE

WRITE_TO-XML_FILE 'xml record' 'name space'

Writes the XML records to the XML output file.

(Optional) WRITE_CDATA_TO_XML_FILE

WRITE_CDATA_TO_XML_FILEcdata string

Adds character data or CDATA to XML files that are not parsed. A CDATA section starts with "<![CDATA[" and ends with "]]>".

)Optional) EDIT_XML_ROOT

EDIT_XML_ROOT "root tag" "name space"

Modifies the root tag name.

(Optional) ADD_COMMENT_TO_XML_FILE

ADD_COMMENT_TO_XML_FILE ‘comment

Adds comment as title to the XML file.

(Optional) CLEAR-XML-RECORD

CLEAR_XML_RECORDXML record name

Clears parent and child XML records.