XML Data Islands Application Development (Windows Embedded CE 6.0)
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.
Internet Explorer 6 for Windows Embedded CE is required for using the XML Data Islands functionality.
<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
- Using the
Inline XML is enclosed within the
</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 <XML> 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 <SCRIPT> tag
You can also use the
<SCRIPT> tag to create a data island. The following code uses the <
<SCRIPT LANGUAGE="xml" ID="XMLID"> <customer> <name>Mark Hanson</name> <custID>81422</custID> </customer> </SCRIPT>