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-42
Methods
Example
The following example creates an attribute node code NewAttr and adds it to the
attributes for the DOMDocument Object
:
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 attr = map.removeNamedItem("street");
println(attr.nodeValue);
Output
Yes
removeQualifiedItem
Removes a node specified by the local name and namespace URI. The
nameSpaceURI parameter is the nameSpace prefix that qualifies the attribute name.
Syntax
var objXMLDOMNode =
oXMLDOMNamedNodeMap.removeQualifiedItem(baseName,namespaceURI)
Parameters
baseName – The local name of the node to remove.
namespaceURI – The namespace URI of the node to remove.
Return Value
Object – An XMLDOMNode with the specified baseName and namespaceURI, or
null if it does not identify any node in 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.