Skip to content

Evaluate

Returns the string value of the current node.

1
myXml.Evaluate():string

Returns the string value of the node selected by the specified XPath expression.

1
myXml.Evaluate(xpath: string):string

Parameters

string xpath
    The XPath expression to evaluate.

Returns

The string value of the selected node.

Remarks

The following example demonstrates finding the value of a current customer's ID:

Evaluate with an XPath expression

1
var id = $Xml.Evaluate('CustomerInformation/Customer/Id');

Info

The following example is similar to the one above but uses double slashes (,//,). This is used to look up the ,Customer, node everywhere, starting from the root element.

Evaluate with an XPath expression using double slashes

1
var id = $Xml.Evaluate('//Customer/Id');

See Also