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-20
Methods
Example
var doc = new XML.DOMDocument;
doc.validateOnParse = true;
doc.preserveWriteSpace = false;
doc.load("sample.xml");
println(doc.documentElement.childNodes.length);
Output
5
validateOnParse
Indicates whether the parser should validate this document. When set to true, it
enables the parser’s validation checks; when set to false, it disables the check.
The default value is false.
This property is applicable only when the DTD is defined in the DOMDocument
Object.
Remarks
Boolean. Read/write.
Syntax
var boolValue = domDoc.validateOnParse
domDoc.validateOnParse = true|false
Example
var doc = new XML.DOMDocument;
doc.validateOnParse = true;
doc.load("sample.xml");
println(doc.documentElement.childNodes.length);
Output
5
Methods
createAttribute
Creates a new XMLDOMAttribute Object with the specified name or the optional
namespace. Creating an attribute with this method is the same as using createNode
where the type parameter value is NODE_ATTRIBUTE.
Syntax
objAttribute = doc.createAttribute(name[,namespaceURI]);