This page is Not Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

xml

Summary

Defines a simple XML data that can be embedded directly in an HTML page.

Overview Table

DOM Interface
HTMLElement

Examples

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 example uses the readyState property of the XMLDOMDocument object to determine whether the XML data island is completely downloaded.

if (oMetaData.XMLDocument.readyState == 4)
      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);

Notes

Remarks

The readyState property of the XML element, available as a string value, corresponds to the readyState property of the XMLDOMDocument object, which is available as a long value. The string values correspond to the long values of the XML document object’s property as shown in the Examples section. The XMLDocument property is the default property. This element is available in HTML and script as of Microsoft Internet Explorer 5.

Standards information

There are no standards that apply here.

Members

The xml object has these types of members:

  • [#events Events]
  • [#methods Methods]
  • [#properties Properties]

Events

The xml object has these events. {

Attributions