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-35
Methods
Parameters
index – Unsigned Integer. Index of the item within the collection.
Return Value
objXMLDOMNode – The node at the index position in the list, or null if that is not a
valid index.
Example
var doc = new XML.DOMDocument;
doc.validateOnParse = true;
doc.load("sample.xml");
var list = doc.documentElement.childNodes;
println(list.item(0).childNodes.item(0).nodeName);
Output
name
nextNode
Returns the next node in the collection. 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 nulls when the current node is the last node or there are no
items in the list.
Syntax
var objXMLDOMNode = oXMLDOMNodeList.nextNode()
Parameters
None.
Return Value
objXMLDOMNode – Refers to the next node in the collection. Returns null if there
is no next node.
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 + " ");
}
Output
name department GPA gender address