Document Object
Represents an XML document in the Document Object Model (DOM).

Properties
documentElement Retrieves the root element node of the document.
nodeType Retrieves the type of the node.

Methods
getElementById Returns the Node object that has an id attribute with the specified value.
getElementsByTagName Returns a NodeList collection of descendant element nodes with the specified name.
getElementsByTagNameNS Returns a NodeList collection of descendant element nodes with the specified local name and namespace URI.

Remarks
The Document object is the top-level object in the DOM. The Document object is accessible directly via the variable associated with the name attribute of the data element.
Examples

The example below uses the following data.

<?xml version="1.0"?>
<?access-control allow="*"?>
<quote>
   <name>Ford Motor Company</name>
   <ticker>F</ticker>
   <open>28.35</open>
   <last>28.72</last>
   <change>.54</change>
   <day_high>29.03</day_high>
   <day_low>28.03</day_low>
</quote>

The following example prints the nodeName of the root document element to the debug log.

<vxml version="2.0">
   <data name="oData" src="quote.exml"/>
   <form id="main">
      <script>
         var oRoot = oData.documentElement;
         vxmllog(oRoot.firstChild.data);
       </script>
   </form>
</vxml>


[24]7 Inc.| Terms of Service| Privacy Policy| General Disclaimers