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-71
Exception and Error Information
Remarks
String. Read-only.
Syntax
sEncoding = oXMLDOMDocument.encoding
Example
var doc = new XML.DOMDocument
doc.load("sample.xml");
var oDecl = doc.firstChild;
atp.print("XML encoding =" + oDecl.encoding);
standalone
Specifies the standalone string of the XML declaration statement. The standalone
property contains an empty string if it is not specified in the original document.
Remarks
String. Read-only.
Syntax
sStandalone = oXMLDOMDocument.standalone
Example
var doc = new XML.DOMDocument
doc.load("sample.xml");
var oDecl = doc.firstChild;
atp.print("XML standalone =" + oDecl.standalone);
Exception and Error Information
An ATPException object might be thrown while executing the XML DOM methods. To
prevent the program from stopping on any exception, use a try-catch block to check the
error information and recover from any exception.
The following list shows the possible values for the error code property of the
ATPException object defined for XML objects:
ATP_ERR_DOM_UNKNOWN(0)
ATP_ERR_DOM_EXCEPTION(1): This exception is thrown by the low-level
XML/DOM parser.
ATP_ERR_DOM_USAGE(2): Indicates an invalid usage of methods, usually an
incorrect number of parameters.
ATP_ERR_DOM_INVALID_NODE_TYPE(3): Indicates that the input parameter
has an invalid DOM_Node type, which is not supported by the method.
ATP_ERR_DOM_INVALID_PARAM_TYPE(4): Indicates that the input parameter
is an invalid object type for the method.