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-67
Methods
ATPException
The following list shows the possible error-detail codes for the ATPException,
where error code is equal to ATP_ERR_DOM_EXCEPTION.
INDEX_SIZE_ERR(1): This error-detail code is raised if the specified offset is
negative or greater than the number of characters in data, or if the specified
count is negative.
NO_MODIFICATION_ALLOWED_ERR(7): This error-detail code indicates
that the node is read-only.
Example
var doc = new XML.DOMDocument;
doc.load("sample.xml");
var comment = doc.documentElement.previousSibling;
comment.replaceData(0, 4, ">>>>");
println(comment.data);
Output
>>>> is comment line
substringData
Extracts a range of data from the node.
Syntax
strData = oXMLCharacterData.substringData(offset, count)
Parameters
offset (unsigned integer) – Start offset of the substring to extract.
count (unsigned integer) – The number of characters to extract.
Return Value
StrData (string) – The specified substring. If the sum of offset and count
exceeds the property length value, then all characters to the end of the data are
returned.
ATPException
The following list shows the possible error-detail codes for the ATPException,
where error code is equal to ATP_ERR_DOM_EXCEPTION.
INDEX_SIZE_ERR(1): This error-detail code is raised if the specified offset is
negative or greater than the number of characters in data, or if the specified
count is negative.
NO_MODIFICATION_ALLOWED_ERR(7): This error-detail code indicates
that the node is read-only.