Extracts an XML fragment (i.e. a collection of nodes) located at the specified XPath and saves it to a new file.
|
AWE's XML actions require a basic understanding of XML and related terms, such as XPath, DTD and XSLT. |
Declaration
<AMXMLEXTRACTFRAGMENT XPATH="text" XMLDESTINATION="text" ROOTNODENAME="text" OVERWRITEFILE="text [options]" />
Example
<AMXMLEXTRACTFRAGMENT XPATH="/BookMarks/Money" XMLDESTINATION="C:\Output.xml" OVERWRITEFILE="YES" ROOTNODENAME="Automate" SESSIONNAME="XML1" />
See Also: Create XML Node, Delete XML Node, Edit XML Node, End XML Session, Evaluate Xpath Expression, Merge XML Files, Output XML, Read XML Node, Sign XML Document, Start XML Session, Transform XML, Validate XML File, Verify XML Document, XML Node to Dataset
Property |
Type |
Required |
Default |
Markup |
Description |
XPath Expression |
Text |
Yes |
(Empty) |
XPATH="/BookStore/Books/Price" |
The Xpath expression to the node which you want to fragment from the current XML document. |
Output File |
Text |
Yes |
(Empty) |
XMLDESTINATION="C:\ExtractedXML.xml" |
The file in which you want to store the fragment as a first child of root node. |
Root node name of output |
Text |
Yes |
(Empty) |
ROOTNODENAME="RootNodeName" |
The name of the root node for the new XML file. |
Overwrite if File Exists |
Yes/No |
No |
No |
OVERWRITEFILE="YES" |
If set to Yes, specifies that if the file already exists, it will be overwritten with the new document. If set to NO (default), the step fails if the file already exists. |
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. |