XML DOM selectNode() method
Definition and usage
The selectNode() method sets the boundary of the range to a node.
Syntax:
selectNode(refNode)
Parameter
Parameter | Description |
---|---|
refNode | The selected node (which will become the content of the current range). |
throw
If refNode is Attr, Document, or Notation node, the method will throw a code of INVALID_NODE_TYPE_ERR RangeException exception.
If refNode The document owned by the method is different from the document that created the range, and the method will throw a code of WRONG_DOCUMENT_ERR DOMException exception.
Description
This method will set the content of the range to the specified refNode Node. That is, 'select' that node and its descendants.