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-70
XMLDecl Object
This object has no unique properties or methods of its own, but inherits the same
properties and methods from XMLDOMText Object.
XMLDecl Object
The XMLDecl object refers to XML declaration nodes in the DOM tree. The Apache
XML parser creates an XMLDecl object for a declaration node, instead of
XMLDOMProcessingInstruction, while parsing an XML document. Therefore, there
will be no XMLDOMProcessingInstruction objects created after loading a document to
an XMLDOMDocument object. The XMLDecl is always the first child node of an
XMLDOMDocument, if the document has a declaration node. The XMLDecl object has
the following three properties.
Table 5-20
specifies the common properties of the XMLDOMEntity object.
Properties
version
Specifies the version string of the XML declaration statement.
Remarks
String. Read-only.
Syntax
sVer = oXMLDOMDocument.version
Example
var doc = new XML.DOMDocument
doc.load("sample.xml");
var oDecl = doc.firstChild;
atp.print("XML version =" + oDecl.version);
encoding
Specifies the encoding string of the XML declaration statement. The encoding
property contains an empty string if it is not specified in the original document.
Table 5-20. XMLDecl Object Properties
Property Description
version Specifies the version string of the XML declaration statement.
encoding Specifies the encoding string of the XML declaration
statement.
standalone Specifies the standalone string of the XML declaration
statement.