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-25
Methods
Parameters
name – String specifying the name of the entity referenced. This name is
subsequently available as the new object’s nodeName property.
Return Value
objEntityRef – XMLDOMEntityReference Object.
ATPException
The following list shows the possible error-detail codes for the ATPException,
where error code is equal to ATP_ERR_DOM_EXCEPTION.
INVALID_CHARACTER_ ERR(5): Raised if the specified qualified name
contains an invalid character.
Example
var doc = new XML.DOMDocument;
doc.validateOnParse = true;
doc.load("sample.xml");
var node =
doc.documentElement.childNodes.item(0).childNodes.item(0);
var ref = doc.createEntityReference("newRef");
println("name = " + ref.nodeName + "; type = " +
ref.nodeType);
Output
name = newRef; type = 5
createNode
Creates a node using the supplied type, name, and namespace. The name parameter
depends on the value of the type parameter. The relations between node name and
node type are summarized below.
You cannot create a node of type NODE_DOCUMENT,
NODE_DOCUMENT_TYPE, or NODE_ENTITY. An attempt to do this generates
an ATP_ERR_DOM_INVALID_NOTE_TYPE(3) error.
Node Type Name
NODE_ATTRIBUTE The name of the attribute.
NODE_CDATA_SECTION,
NODE_COMMENT,
NODE_DOCUMENT_FRAGMENT,
NODE_TEXT
The nodeName property for these node
types is a constant value; the name
parameter is ignored.
NODE_ELEMENT The name of the XML tag.
NODE_ENTITY_REFERENCE The name of the entity referenced.
NODE_PROCESSING_INSTRUCTION The target. The namespaceURI here is for
processing instruction content.