Output XML

Outputs the in-memory representation of the XML session, for example, to a file or variable before ending the XML session. Using this action does not end the session, thus allowing subsequent XML steps to continue using the session. Outputs XML data currently saved onto a document or variable.

AWE's XML actions require a basic understanding of XML and related terms, such as XPath, DTD and XSLT.

When creating an XML task, it is required that an XML session name is initially generated using the Start XML Session action. This session can be identified by subsequent XML steps which include the same session name. This allows several XML documents to be active simultaneously within the same task. When an XML session is created, the XML file bound by that session becomes locked. An End XML Session action can be used to end the current session. This frees the session name to be used in a different session and unlocks the XML file bound to that session.

During an XML session, modifications are not performed on the original XML file bound by that session. Rather, as a safety measure, a copy of the file is saved to memory upon the creation of a session. Any modifications performed by subsequent XML steps are performed on the copy of the XML data saved to memory. The Output XML File action can be used to output the in-memory representation of the XML session to a file or variable before ending the XML session. Using this action does not change the XML or end the session, thus allowing subsequent XML steps to continue using the session.

Declaration

<AMXMLOUTPUT OUTPUTTYPE="text [options]" XMLFILETYPE="text [options]" XMLDESTINATION="text" OVERWRITEFILE="text [options]" />

Example

<AMXMLOUTPUT OUTPUTTYPE="File" XMLFILETYPE="Original" />

Note : Outputting the changes into same file

<AMXMLOUTPUT OUTPUTTYPE="Variable" RESULTVARIABLE="OutputXML" /

Note : Putting the XML document data into Variable.

See Also: Delete XML Node, Evaluate Xpath Expression, Extract XML Fragment, Merge XML Files, Read XML Node, Sign XML Document, Start XML Session, Transform XML, Validate XML File, Verify XML Document, XML Node to Dataset

General Tab

Property

Type

Required

Default

Markup

Description

Output to

Text (options)

Yes

File

OUTPUTTYPE="Variable"

Specifies where to store the XML document after you have modified it using different XML actions. The available options are:

  • File - Use this option if you want to store it in new file or an original file.

  • Variable - Use this option if you want to store XML data into a variable.

Save XML Document To

Text (options)

No

New File

XMLFILETYPE="Original"

Specifies the file you want to save the XML document into. This option only appears if you select the File option under the Output To drop-down. The available options are:

  • New File - Stores the current XML document into new file

  • Original File - During Start XML Session if new file is created or existing file is used, then this option will use that file to store the modified XML document.

Output XML File

Text

No

(Empty)

XMLDESTINATION="a"

The destination XML file. This parameter is active only if the Save XML Document To parameter is set to New File.

Overwrite if file exists

Yes/No

No

No

OVERWRITEFILE="YES"

If set to YES, any output XML file that already exists will be overwritten. This parameter is set to NO by default and becomes active only if the Save XML Document To parameter is set to New File.

Session Name

Text

No

(Empty)

SESSIONNAME="FirstXMLSession"

The session name to identify the in-memory XML document to use in subsequent XML steps. This allows several in memory XML documents to be active simultaneously.