Partager via


XML Data Islands Application Development (Windows Embedded CE 6.0)

1/6/2010

An XML 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 the XML document through script or through the <OBJECT> tag. Almost anything that can be in a well-formed XML document can be inside a data island.

Note

Internet Explorer 6 for Windows Embedded CE is required for using the XML Data Islands functionality.

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 following list shows the methods in which a data island may be created:

  • Inline XML
  • Using the <XML> tag
  • Using the <SCRIPT> tag

Inline XML

Inline XML is enclosed within the <XML> and </XML> tags, and is inserted in HTML code, as shown in the following example.

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

Using the &lt;XML&gt; tag

External XML uses the SRC attribute on the <XML> tag to reference an external file. The SRC attribute can refer to a local file or specify a URL. By using URLs that point to external servers, data can be integrated from several sources. The following code uses the SRC attribute with a local file.

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

Using the &lt;SCRIPT&gt; tag

You can also use the <SCRIPT> tag to create a data island. The following code uses the <SCRIPT> tag.

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

See Also

Concepts

XML Data Islands OS Design Development

Other Resources

XML Data Islands