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

createNodeIterator method

Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.

Document Object Model (DOM) Level 2 Traversal and Range Specification, Section 1.2Internet Explorer 9

 

Syntax


HRESULT retVal = object.createNodeIterator(pRootNode, ulWhatToShow, pFilter, fEntityReferenceExpansion, ppNodeIterator);

Parameters

pRootNode [in]

Type: Node

The root element or node to start traversing on.

ulWhatToShow [in]

Type: long

The type of nodes or elements to appear in the node list. For more information, see IDOMNodeIterator::whatToShow.

pFilter [in]

Type: VARIANT

A custom NodeFilter function to use. For more information, see IDOMNodeIterator::filter. Use NULL for no filter.

fEntityReferenceExpansion [in]

Type: VARIANT_BOOL

A flag that specifies whether entity reference nodes are expanded. For more information, see IDOMNodeIterator::expandEntityReferences.

ppNodeIterator [out, retval]

Type: IDOMNodeIterator

Returns a NodeIterator object.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Exceptions

ExceptionCondition
NotSupportedError

pRootNode is NULL. Versions earlier than Internet Explorer 10 will throw the exception as NOT_SUPPORTED_ERR.

 

Standards information

Remarks

Use the IDocumentTraversal::createNodeIterator method when you want to focus on node content because NodeIterator traverses a flat list of nodes in the document structure.

 

 

Community Additions

ADD
Show:
© 2015 Microsoft