IElementTraversal interface

Provides properties for traversing elements in a document. Conceptually, using this property is the same as using a NodeIterator that filters out everthing except for elements. Because traversing elements is the most common use case for developers, this property offers a simpler interface API.

Members

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

  • Properties

Properties

The IElementTraversal interface has these properties.

Property Description

childElementCount

Retrieves the number of immediate child nodes of the current element or a zero if the element does not contain any child nodes. IElementTraversal::childElementCount does not return all child nodes, only child nodes that are IHTMLDOMNode::nodeType =1, or element nodes.

firstElementChild

Retrieves a reference to the first child element, or NULL if there are no child elements.

lastElementChild

Retrieves a reference to the last child element or NULL if there are no child elements.

nextElementSibling

Retrieves a reference to the sibling element that immediately follows or NULL if the element does not have any sibling elements that follow it.

previousElementSibling

Retrieves a reference to the immediately preceding sibling element or NULL if the element does not have any preceding siblings.

 

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