Resets the iterator.
Syntax
oXMLDOMNodeList.reset()
Remarks
This method reinitializes the iterator to point before the first node in the XMLDOMNodeList object, so that the next call to nextNode returns the first item in the list.
This member is an extension of the W3C DOM.
Example
The following example creates an XMLDOMNodeList object and iterates the collection using the nextNode method. It then uses the reset method to reset the iterator to point before the first node in the list:
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
objNodeList.reset
Set objNode = objNodeList.nextNode
MsgBox objNode.text
Applies To