Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Overview

Selects all matching nodes by specified xpath.

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

Selects all matching nodes by specified xpath with callback function.

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

Arguments

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

Example

Basic usage

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

Example

Basic usage

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

Example

Using callback function to map selected nodes

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