XML DOM selectNodes() method
Definition and usage
The selectNodes() method selects nodes using an XPath query.
Syntax:
nodeObject.selectNodes(query)
Parameter | Description |
---|---|
query | XPath query string. |
Return value
contains a NodeList of nodes that match the query.
Description
This specific IE method calculates an XPath expression using the node as the root node for the query and returns the result as a NodeList. This selectNodes() method is only used for XML document nodes and not for HTML document nodes. Note that since Document objectThey are their own nodes, and this method can be applied to the entire XML document.
See Document.evaluate(), for an alternative cross-browser method.