SelectAll¶
Selects all matching nodes based on the specified XPath expression.
1 |
|
Selects all matching nodes based on the specified XPath expression and executes a callback function for each selected node.
1 |
|
Parameters¶
string xpath
The XPath expression to use for selecting nodes.
(node: Xml, i: number) => any callback
A callback function to execute for each selected node. Optional. The callback function receives the selected node and its index as arguments.
Returns¶
An array of Xml objects representing the selected nodes. An array containing the results of the callback function for each selected node.
Remarks¶
Basic usage¶
1 |
|
Basic usage¶
1 2 3 |
|
Using callback function to map selected nodes¶
```javascript var customerIds = $Xml.SelectAll('//Customer', function(customer) { return customer.Evaluate('Id'); });