Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
IElementTraversal
Collapse the table of content
Expand the table of content

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

The IElementTraversal interface has these properties.

PropertyDescription

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 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IDispatch

 

 

Community Additions

ADD
Show:
© 2015 Microsoft