iTP Active Transaction Pages (iTP ATP) Programmer's Guide
XML for ATP Add-On Module
iTP Active Transaction Pages (iTP ATP) Programmer’s Guide—522292-002
5-29
Methods
load
Loads an XML document from a file. Calling load or loadXML immediately 
discards the content of the existing document. This method is an extension of the 
W3C DOM.
Syntax
boolValue = doc.load(filename|atp.request);
Parameters
filename – String that specifies the name of the source file.
atp.request object – Loads XML content from the CGI interface.
Return Value
Boolean. Returns true if the load succeeded; false if the load failed.
Example
var doc = new XML.DOMDocument;
if(false == doc.load("sample.xml"))
{
 print("error = " + doc.parseError.errorCode + " ");
 print("line = " + doc.parseError.line + " ");
 println("linepos = " + doc.parseError.linepos + " ");
 println("reason = " + doc.parseError.reason);
}
Output
error = 4 line = 483 linepos = 0 
reason = Could not determine base pathname of the file
loadXML
Loads an XML document using the supplied string. Calling load or loadXML 
immediately discards the content of the existing document. This method is an 
extension of the W3C DOM.
Syntax
boolValue = doc.loadXML(strXML);
Parameters
strXML – Contains the XML string to load into this XML document object. This 
string can contain an entire XML document or a well-formed fragment.
Return Value
Boolean. Returns true if the load succeeded; false if the load failed.










