reset Method (IXMLDOMNamedNodeMap)
Resets the iterator.
oXMLDOMNamedNodeMap.reset();
Example
You can use books.xml to run this sample code. |
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.6.0"); var nodeBook, nodeAttribute, s; xmlDoc.setProperty("SelectionLanguage", "XPath"); xmlDoc.async = false; xmlDoc.load("books.xml"); if (xmlDoc.parseError.errorCode != 0) { var myErr = xmlDoc.parseError; WScript.Echo("You have error " + myErr.reason); } else { nodeBook = xmlDoc.selectSingleNode("//book"); nodeBook.attributes.reset(); nodeAttribute = nodeBook.attributes.nextNode(); WScript.Echo(nodeAttribute.text); }
Output
bk101
HRESULT reset(void);
Return Values
S_OK
The value returned if successful.
This member is an extension of the Worldwide Web Consortium (W3C) Document Object Model (DOM).
Implemented in: MSXML 3.0 and MSXML 6.0
Show: