Extract XML Fragment Action

Description

Extracts an XML fragment (i.e. a collection of nodes) located at the specified XPath and saves it to a new file.

Declaration

<AMXMLEXTRACTFRAGMENT XPATH="text" XMLDESTINATION="text" ROOTNODENAME="text" OVERWRITEFILE="text [options]" />

Example

<AMXMLEXTRACTFRAGMENT XPATH="/BookMarks/Money" XMLDESTINATION="C:\Output.xml" OVERWRITEFILE="YES" ROOTNODENAME="Automated Workflow" SESSIONNAME="XML1" />

General Tab Parameters

XPath expression: Specifies the Xpath expression to the node that you want to fragment from the current XML document.

Text, Required
MARKUP: XPATH="/BookStore/Books"

Output file: Specifies the file in which you want to store the fragment as a first child of root node.

Text, Required
MARKUP: XMLDESTINATION="C:\ExtractedXML.xml"

Root node name for output: Specifies the name of the root node for the new XML file.

Text, Required
MARKUP: ROOTNODENAME="RootNodeName"

Overwrite if file exists: If set to Yes, specifies that if the file already exists, it will be overwritten with the new document. If set to No, the step fails if the file already exists.

Yes/No, Optional - Default "NO"
MARKUP: OVERWRITEFILE="YES"

Session name: Specifies 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.

Text, Optional - Default "XMLSession1"
MARKUP: SESSIONNAME="FirstXMLSession"

See Also

Create XML Node Action, Delete XML Node Action