Skip to content

SelectAll

Selects all matching nodes by specified xpath.

1
myXml.SelectAll(xpath: string):Array<Xml>

Selects all matching nodes by specified xpath with callback function.

1
myXml.SelectAll(xpath: string, callback: (node: Xml, i: number) => any):Array<any>

Parameters

string xpath
    XPath of node to selected.

(node: Xml, i: number) => any callback
    Callback function to execute for each selected node. Optional.

Remarks

Basic usage

1
var allCustomers = $Xml.SelectAll('//Customer');

Basic usage

1
2
3
$Xml.SelectAll('//Customer', function(customer) {
   var customerId = customer.Evaluate('Id');
});

Using callback function to map selected nodes

```js var customerIds = $Xml.SelectAll('//Customer', function(customer) { return customer.Evaluate('Id'); });

See Also