createNodeIterator method

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

Syntax

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

Parameters

Return value

Type: HRESULT

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

Exceptions

Exception Condition
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.