XMLDocument

HTML (DHTML)

XMLDocument Property

Internet Development Index

Retrieves a reference to the XML Document Object Model (DOM) exposed by the object.

Syntax

HTMLN/A
Scripting[ oXMLObject = ] object.XMLDocument

Possible Values

oXMLObjectObject that specifies a reference to the XML DOM exposed by the object.

The property is read-only. The property has no default value.

Remarks

XMLDocument is the default property, and therefore specifying it is optional. The XMLDocument property is useful when passing an entire XML document to a method that requires an IXMLDOMNode parameter, such as the IXMLDOMNode::transformNode method. The XML data island itself (denoted by the <XML> tag) is considered an html element rather than an xml element. The XMLDocument property provides access to the root of the XML tree within the data island.

For a complete description of the XML DOM exposed by the XMLDocument property, see the XML DOM Reference.

Example

This example uses the XMLDocument property to access the object model of an xml data island.

<SCRIPT>
function fnCheck(){
var oNode = oMetaData.XMLDocument.selectSingleNode
("METADATA/ABSTRACT");
alert(oNode.text);
}
</SCRIPT>
<XML ID="oMetaData">
<METADATA>
<AUTHOR>John Smith</AUTHOR>
<GENERATOR>Visual Notepad</GENERATOR>
<PAGETYPE>Reference</PAGETYPE>
<ABSTRACT>Specifies a data island</ABSTRACT>
</METADATA>
</XML>
<INPUT TYPE=button VALUE="Test" onclick="fnCheck()">

Standards Information

There is no public standard that applies to this property.

Applies To

document, XML

See Also

XSLDocument, Introduction to Persistence