다음을 통해 공유


reset Method (IXMLDOMNamedNodeMap)

 

Resets the iterator.

JScript Syntax

oXMLDOMNamedNodeMap.reset();  

Example

Note

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

C/C++ Syntax

HRESULT reset(void);  

Return Values

S_OK
The value returned if successful.

Remarks

This member is an extension of the Worldwide Web Consortium (W3C) Document Object Model (DOM).

Versioning

Implemented in: MSXML 3.0 and MSXML 6.0

See Also

IXMLDOMNamedNodeMap