iTP Active Transaction Pages (iTP ATP) Programmer's Guide

XML for ATP Add-On Module
iTP Active Transaction Pages (iTP ATP) Programmer’s Guide522292-002
5-36
XMLDOMNamedNodeMap Object
reset
Resets the iterator. 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.
Syntax
oXMLDOMNodeList.reset()
Parameters
None.
Return Value
None.
Example
var doc = new XML.DOMDocument;
doc.validateOnParse = true;
doc.load("sample.xml");
var list = doc.documentElement.childNodes.item(0).childNodes;
while(1)
{
var node = list.nextNode();
if(node == null) break;
print(node.nodeName + " ");
}
list.reset();
println("\n" + list.nextNode().nodeName);
Output
name department GPA gender address
name
XMLDOMNamedNodeMap Object
XMLDOMNamedNodeMap objects are used to represent collections of nodes that can
be accessed by name. Note that XMLDOMNamedNodeMap does not inherit from the
XMLDOMNodeList Object; XMLDOMNamedNodeMap objects are not maintained in
any particular order. Nodes contained in an XMLDOMNamedNodeMap object can also
be accessed by an ordinal index, but this is simply to allow convenient enumeration of
the contents and does not imply that the DOM specifies an order to these nodes.
XMLDOMNamedNodeMap objects are instantiated by these methods:
XMLDOMNode.attributes
XMLDOMDocumentType.entities
XMLDOMDocumentType.notations