Allows you to create iterators and tree-walkers to traverse the nodes of a Document.
Browser/User Agent Support
| IE | Mozilla | Netscape | Opera | Safari | Netscapte | no | 1.0+ | 2.0+ | no | 1.0+ | no |
|---|
Constructors
| Constructor | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Allows you to create iterators and tree-walkers to traverse the nodes of a Document. | no | 1.0+ | 2.0+ | no | 1.0+ | no |
Methods
| Method | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Creates a new NodeIterator for the subtree at the specified node. | no | 1.0+ | 2.0+ | no | 1.0+ | no |
Creates a new TreeWalker for the subtree at the specified node. | no | 1.0+ | 2.0+ | no | 1.0+ | no |
Availability
HTML DOM Level 2 | W3C
Constructor Detail
DocumentTraversal DocumentTraversal()
Allows you to create iterators and tree-walkers to traverse the nodes of a Document.
- Visibility
- internal
Method Detail
createNodeIterator(Node root, Number whatToShow, [NodeFilter filter,] [Boolean entityReferenceExpansion]) : NodeIterator
Creates a new NodeIterator for the subtree at the specified node.
| Node | root | Node to be iterated with its children. |
| Number | whatToShow | Specifies which types of nodes to show in the treeview. |
| NodeFilter | filter | Filter to use with this NodeIterator. (optional) |
| Boolean | entityReferenceExpansion | If true, specifies that entity reference nodes should be expanded. (optional) |
- Throws
- Raises a NOT_SUPPORTED_ERR if the specified root is null.
- Availability
HTML DOM Level 2 | W3C
createTreeWalker(Node root, Number whatToShow, [NodeFilter filter,] [Boolean entityReferenceExpansion]) : TreeWalker
Creates a new TreeWalker for the subtree at the specified node.
| Node | root | Node to serve as the root for the TreeWalker. |
| Number | whatToShow | Specifies which types of nodes to show in the treeview. |
| NodeFilter | filter | Filter to use with this TreeWalker. (optional) |
| Boolean | entityReferenceExpansion | If true, specifies that entity reference nodes should be expanded. (optional) |
- Throws
- Throws a NOT_SUPPORTED_ERR if the specified root is null.
- Availability
HTML DOM Level 2 | W3C
