Equals¶
Returns a boolean value indicating whether the current node has the specified value.
1 | |
Returns a boolean value indicating whether the specified XPath has the specified value.
1 | |
Parameters¶
any val
Value to compare.
string xpath
The XPath to evaluate. If not specified, the current node is used.
Returns¶
true if the node value equals val; otherwise, false.
Remarks¶
The node's string value is compared with val. Pass strings, for example 'false' rather than false.
The string value of the selected node is compared with val case-sensitively. Pass strings, for example 'false' rather than false; to interpret true/false/1/0 values, use Xml.EvaluateBoolean.
Examples¶
Compare the value of a selected node¶
1 | |
Compare a node value¶
1 2 | |