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-63
Properties
Properties
data
Returns the character data of the node. It contains the same value as the
nodeValue for this node. The meaning of the value depends on the
XMLDOMNode Object nodeType property, as follows:
The DOM implementation may not put arbitrary limits on the amount of data that
may be stored in a character data node. However, implementation limits may mean
that the entirety of a node’s data cannot fit into a single string. In such cases, the user
can call substringData to retrieve the data in appropriately sized pieces.
Remarks
String. Read/write.
Syntax
strValue = oXMLDOMCharacterData.data
objXMLDOMCharacterData.data = strValue
ATPException
The following list shows the possible error-detail codes for the ATPException,
where error code is equal to ATP_ERR_DOM_EXCEPTION.
NO_MODIFICATION_ALLOWED_ERR(7): This error-detail code indicates
that the node is read-only.
DOMSTRING_SIZE_ERR(2): Raised when it would return more characters
than fit in a string variable on the implementation platform.
Example
var doc = new XML.DOMDocument;
doc.load("sample.xml");
var comment = doc.documentElement.previousSibling;
println(comment.data);
Output
This is comment line
NODE_CDATA_SECTION A string representing the text stored in the CDATA
section.
NODE_COMMENT The content of the comment, exclusive of the comment
start and end sequence.
NODE_TEXT A string representing the text stored in the text node.