Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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.

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.