Author XML Data Islands

 

This topic discusses XML data islands. Data Islands was implemented for MSXML 3.0. Later versions of MSXML do not support it.

What Is an XML Data Island?

A data island is an XML document that exists within an HTML page. It allows you to script against the XML document without having to load it through script or through the <OBJECT> tag. Almost anything that can be in a well-formed XML document can be inside a data island.

The <XML> element marks the beginning of the data island, and its ID attribute provides a name that you can use to reference the data island.

The XML for a data island can be either inline:

<XML ID="XMLID">
  <customer>
    <name>Mark Hanson</name>
    <custID>81422</custID>
  </customer>
</XML>

...or referenced through a SRC attribute on the <XML> tag:

<XML ID="XMLID" SRC="customer.xml"></XML>

You can also use the <SCRIPT> tag to create a data island.

<SCRIPT LANGUAGE="xml" ID="XMLID">  
  <customer>  
    <name>Mark Hanson</name>  
    <custID>81422</custID>  
  </customer>  
</SCRIPT>