Retrieves the XML node value (or attribute value, if specified) located at the position expressed by the XPath and places it into a variable. Commonly used to read and validate an XML document by node type.
|
AWE's XML actions require a basic understanding of XML and related terms, such as XPath, DTD and XSLT. |
Declaration
<AMXMLREADNODE XPATH="text" ATTRNAME="text" RESULTVARIABLE="text" />
Example
Read node value at XPath location "/bookstore/book/price" and place it into variable "BookPrice". Sessionname is "XMLSession1".
<AMXMLREADNODE XPATH="/bookstore/book/price" RESULTVARIABLE="BookPrice" />
See Also: Delete XML Node, Evaluate Xpath Expression, Extract XML Fragment, Merge XML Files, 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 XML node in which to read. |
Attribute (optional) |
Text |
No |
(Empty) |
XMLATTRIBUTE="Price" |
The XML node's attribute name. |
Populate variable with value |
Text |
No |
(Empty) |
NEWVALUE="NewValue" |
The variable to populate with the node or attribute value. |
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. |