Method: Document.createTreeWalker()
The createTreeWalker() method creates a TreeWalker object, which you can use to traverse the specified document subtree.
Parameters
Parameter |
Type |
Description |
|---|---|---|
root |
The node that will serve as the root for this TreeWalker object. The TreeWalker.currentNode property is set to the value of root. |
|
whatToShow |
unsigned long |
The types of nodes to show in the tree view. The value may be one or more of:
Multiple values may be specified using a bitwise OR. Note that because attributes, entities, and notations are not the child of any other node, they never appear in the TreeWalker object’s logical view unless root is defined as a Node of that type. If the respective object is not defined as the root, then SHOW_ATTRIBUTE, SHOW_ENTITY, and SHOW_NOTATION have no meaning. |
filter |
The filter to use with this TreeWalker object. This parameter may be null. |
|
entityReferenceExpansion |
boolean |
When true, this method specifies that entity reference nodes should be expanded. |