Evaluate¶
Returns the string value of the current node.
1 | |
Returns the string value of the node selected by the specified XPath expression.
1 | |
Parameters¶
string xpath
The XPath expression to evaluate.
Returns¶
The string value of the selected node.
Remarks¶
Returns an empty string when the XPath does not select a node. In server scripts, an error is thrown when the XPath selects more than one node; use a predicate such as [1] to pick one, or Xml.SelectAll to read every value.
The XPath can also be an expression that calculates a value, such as concat(...) or count(...); the result is returned as a string.
Examples¶
Read the value of a selected node¶
1 | |
Read a node value¶
1 2 | |
Evaluate an XPath expression¶
1 2 | |
Read a value from the pool root when¶
$Xml points to a nested element
1 | |