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-38
Methods
Methods
item
Returns the item specified by the index value in the collection. The range of the
index is 0 to length -1.
Syntax
var objXMLDOMNode = oXMLDOMNamedNodeMap.item(index)
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");
root = doc.documentElement;
var map =
root.childNodes.item(0).childNodes.item(4).attributes;
println(map.item(0).nodeName);
Output
street
getNamedItem
Retrieves a node specified by name.
Syntax
var objXMLDOMNode = oXMLDOMNamedNodeMap.getNamedItem(name)
Parameters
name – The nodeName of a node to retrieve.
Return Value
ObjectAn XMLDOMNode Object
with the specified nodeName, or null if it
does not identify any node in the map.