Partager via


IDOMTreeWalker interface

Provides an object that can be used to traverse a filtered hierarchy of nodes or elements in a document. This interface is ideal for navigating a representation of the document's tree structure. The IDOMTreeWalker is dynamic and reflects the state of the document as it is edited or changed.

Members

The IDOMTreeWalker interface inherits from the IDispatch interface. IDOMTreeWalker also has these types of members:

  • Methods
  • Properties

Methods

The IDOMTreeWalker interface has these methods.

Method Description
firstChild

Retrieves a reference to the first child of the current node of the filtered TreeWalker hierarchy and updates IDOMTreeWalker::currentNode.

lastChild

Retrieves a reference to the last child of the current node of the filtered TreeWalker hierarchy and updates IDOMTreeWalker::currentNode.

nextNode

Returns the next node in the NodeIterator or TreeWalker list and updates IDOMTreeWalker::currentNode.

nextSibling

Retrieves the next sibling of the current node in the filtered TreeWalker hierarchy and updates IDOMTreeWalker::currentNode.

parentNode

Retrieves the parent object in the document hierarchy relative to the current node and updates IDOMTreeWalker::currentNode.

previousNode

Returns the previous node in the NodeIterator or TreeWalker list and updates IDOMTreeWalker::currentNode.

previousSibling

Retrieves the previous sibling of the current node in the filtered TreeWalker hierarchy and updates IDOMTreeWalker::currentNode.

 

Properties

The IDOMTreeWalker interface has these properties.

Property Description

currentNode

Sets or retrieves where the current node in a filtered TreeWalker hierarchy is positioned.

expandEntityReferences

Flag to specify whether or not the children of entity reference nodes are visible.

filter

Gets the function object that the iterator uses to filter nodes that go into TreeWalker hierarchies or NodeIterator lists.

root

Gets the root node that was specified when the object was created.

whatToShow

Gets which node types are presented through the iterator. Nodes that are not accepted are skipped, but their children are still considered.

 

Requirements

Minimum supported client

Windows Vista with SP1, Windows 7

Minimum supported server

Windows Server 2008 R2

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IDispatch