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);
- strService : String, name of Transformation ServiceMessage Creation to be selected. If omitted, default is used.
- strRootName : String, name of the root element to be created.
Properties
Property | Description |
---|---|
Root | xxNode, read-only, contains the root element node for this document. |
DocRoot | xxNode, read-only, contains the document node (#Document) Basic Concepts |
RootName | String, read-only, contains the name of the root element |
XML | String, read-only, contains the XML text representation of the DOM |
PreserveWhitespace | Boolean, instructs parser to preserve white space when loading XML text, default is False |
Validate | Boolean, instructs parser to validate against referenced DTDs or XSDs when loading XML text, default is False |
Methods
Method | Description |
---|---|
LoadFile | Reads a local XML text file and parse the content into a DOM tree. |
LoadXML | Parses XML text input string into a DOM tree. |
CreateNode | Creates a new xxNode of specified type. |
CreateElementNode | Creates a new xxNode element type node. |
CreateTextNode | Creates a new xxNode text type node. |
CreateCDATANode | Creates a new xxNode CDATA section type node. |
CreateEntityNode | Creates a new xxNode entity type node. |
GetRoot | Retrieves root node element of DOM tree. |
GetDocRoot | Retrieves document node (#Document) |
SelectNode | Retrieves a xxNodeSet object containing a list of element nodes that match the given XPath pattern. |
SelectSingle | Retrieves the first element node that matches the given XPath pattern. |
SortNodes | Sorts nodes - modifies the Dom document! Paramaters: 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" |
GetElementsByTagName | Retrieves a xxNodeSet object containing a list of element nodes that match the given tag name. |
GetXML | Returns 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.