This example uses the XML element to define a simple XML data island that can be embedded directly in an HTML page.
<XML ID="oMetaData"><METADATA><AUTHOR>John Smith</AUTHOR><GENERATOR>Visual Notepad</GENERATOR><PAGETYPE>Reference</PAGETYPE><ABSTRACT>Specifies a data island</ABSTRACT></METADATA></XML>
This example uses the readyState property of the xml object to determine whether the XML data island is completely downloaded.
if (oMetaData.readyState == "complete")
window.alert ("The XML document is ready.");
This script example retrieves the text contained within the ABSTRACT field of the data island.
var oNode = oMetaData.XMLDocument.selectSingleNode("METADATA/ABSTRACT");
alert(oNode.text);