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-41
Methods
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;
var node = map.nextNode();
while(node)
{
print(node.nodeName + " = " + node.nodeValue + " ");
node = map.nextNode();
}
map.reset();
println("\nafter reset, the first node again is " +
map.nextNode().nodeName);
Output
street = Yes permanent = Yes
after reset, the first node again is street
removeNamedItem
Removes a node specified by name. If the removed node is an Attr with a default
value, it is immediately replaced.
Syntax
var objXMLDOMNode = oXMLDOMNamedNodeMap.removeNamedItem(name)
Parameters
name – The nodeName of a node to remove.
Return Value
ObjectThe XMLDOMNode Object
removed from the map.
ATPException
The following list shows the possible error-detail codes for the ATPException,
where error code is equal to ATP_ERR_DOM_EXCEPTION.
NOT_FOUND_ERR(8): This error-detail code is raised if there is no node
named name in the map.
NO_MODIFICATION_ALLOWED_ERR(7): This error-detail code indicates
that the name node map is read-only.