SelectSingle¶
Selects a single node based on the specified XPath expression.
1 |
|
Selects a single node based on the specified XPath expression and executes a callback function if a node is found.
1 |
|
Parameters¶
string xpath
The XPath expression to use for selecting the node.
(node: Xml) => void callback
A callback function to execute on the selected node.
Returns¶
An Xml object representing the selected node. Returns null
if no matching node is found. An Xml object representing the selected node. Returns null
if no matching node is found.
Remarks¶
If multiple nodes match the XPath expression, the first node is selected.
Basic usage¶
1 2 3 4 |
|
If multiple nodes match the XPath expression, the first node is selected.
Using callback function¶
1 2 3 |
|