Returns the next node in the collection.
Syntax
objXMLDOMNode = oXMLDOMNodeList.nextNode()
Returns
XMLDomNode object, which refers to the next node in the collection. Returns NULL if there is no next node.
Remarks
The iterator initially points before the first node in the list, so that 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.
This member is an extension of the W3C DOM.
Example
The following example creates an XMLDOMNodeList object and uses its nextNode property to iterate the collection:
Dim xmlDoc
Dim objNodeList
Dim objNode
Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\books.xml")
Set objNodeList = xmlDoc.getElementsByTagName("AUTHOR")
For i = 0 TO (objNodeList.length -1)
Set objNode = objNodeList.nextNode
MsgBox objNode.text
Next
Applies To