This method returns list of nodes found in the scope of specified node and satisfying specified XPath-query. If no node was found, empty list will be returned.
Before using prefixes of name spaces in the query one must define them, see $xdoc.search-namespaces.
Example $d[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
<document>
<t/><t/>
</document>}]
# result is list of two elements "t"
$list[^d.select[/document/t]]
# iterating through found lists:
# this code will work
# even if query returns no nodes at all
^for[i](0;$list-1){
$node[$list.$i]
Name: $node.nodeName<br />
Type: $node.nodeType<br />
}
In Parser, DOM interface NodeList is class hash with keys 0, 1, …;