Microsoft XML SDK 2.6 - XML Reference

IXMLDOMNodeList::nextNode Method

Returns the next node in the collection.

Visual Basic Syntax

Set objXMLDOMNode = oXMLDOMNodeList.nextNode

C/C++ Syntax

HRESULT nextNode(
    IXMLDOMNode **nextItem);

Parameters

nextItem [out]
Next node in the collection, or Null if there is no next node.

C/C++ Return Values

S_OK
Value returned if successful.
E_INVALIDARG
Value returned if nextItem is Null.

Remarks

The iterator initially points before the first node in the list, so the first call to nextNode returns the first node in the list.

This method returns Null when the current node is the last node or there are no items in the list.

When the current node is removed from the list, subsequent calls to nextNode return Null. The iterator must be reset by calling the reset method.

See Also

IXMLDOMNodeList Interface