Skip to content

EvaluateBoolean

Returns the boolean value of the current node.

1
myXml.EvaluateBoolean():boolean

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

1
myXml.EvaluateBoolean(xpath: string):boolean

Parameters

string xpath
    The XPath expression to evaluate. If not specified, the current node is used.

Returns

The boolean value of the current node. The boolean value of the selected node.

Remarks

This method checks whether the evaluated value is, case-insensitively, equal to "false", "0", or an empty value. All other values are evaluated as true. This method checks whether the evaluated value is, case-insensitively, equal to "false", "0", or an empty value. All other values are evaluated as true.

Read a boolean value from a selected node

1
var isDisabled = $Xml.EvaluateBoolean('//Customer/IsDisabled');

See Also