HasNode¶
Returns a boolean value indicating whether the specified XPath selects at least one node.
1 | |
Parameters¶
string xpath
The XPath expression to test.
Returns¶
true if a matching node exists; otherwise, false.
Remarks¶
Available only in server scripts. Unlike Xml.IsEmpty, this method distinguishes a missing node from a node with an empty value.
Examples¶
Check optional data before reading it¶
1 2 3 | |