xxDomDocument

The xxDomDocument provides access to the Document Object Model (DOM) implementation of a selected Transformation Service.

Constructor

var dom = new xxDomDocument();
var dom = new xxDomDocument(strService);
var dom = new xxDomDocument(strService, strRootName);


Properties

PropertyDescription
RootxxNode, read-only, contains the root element node for this document.
DocRootxxNode, read-only, contains the document node (#Document) Basic Concepts
RootNameString, read-only, contains the name of the root element
XMLString, read-only, contains the XML text representation of the DOM
PreserveWhitespaceBoolean, instructs parser to preserve white space when loading XML text, default is False
ValidateBoolean, instructs parser to validate against referenced DTDs or XSDs when loading XML text, default is False


Methods

MethodDescription
LoadFileReads a local XML text file and parse the content into a DOM tree.
LoadXMLParses XML text input string into a DOM tree.
CreateNodeCreates a new xxNode of specified type.
CreateElementNodeCreates a new xxNode element type node.
CreateTextNodeCreates a new xxNode text type node.
CreateCDATANodeCreates a new xxNode CDATA section type node.
CreateEntityNodeCreates a new xxNode entity type node.
GetRootRetrieves root node element of DOM tree.
GetDocRootRetrieves document node (#Document)
SelectNodeRetrieves a xxNodeSet object containing a list of element nodes that match the given XPath pattern.
SelectSingleRetrieves the first element node that matches the given XPath pattern.
SortNodes

Sorts nodes - modifies the Dom document! Paramaters:
1) Context Node - xxNode

2) Nodes to be sorted identified by given XPath relative to context node.

3) Sort key identified by XPath relative to sorted node. Caution: If the sort key is an attribute of the node to be sorted, the XPath needs to be specified as ./@Attribute.

4) Sort order or data type (not both):

"XMLDOM_SORT_ASCENDING" (Default)

"XMLDOM_SORT_DESCENDING"

"XMLDOM_SORT_STRING" (Default)

"XMLDOM_SORT_NUM"

GetElementsByTagNameRetrieves a xxNodeSet object containing a list of element nodes that match the given tag name.
GetXMLReturns XML text representation of the current DOM tree.

 

Comments

See also xxNode object.

Obtain more information on the concept of XML DOM on www.w3.org/DOM.