Troubleshooting Tips
LANGUAGES: ALL
ASP.NET VERSIONS: ALL
Exploring Data Islands
Internet Explorer XML Data Islands
By Don Kiely
In the last couple of columns I've talked about useful ways to display XML data in a browser, including using the innerHTML attribute of many controls and the XML ASP.NET server control. Another option is to embed the XML data within the Web page itself, either as part of a static page (one dynamically generated each time the page is requested), or even using Dynamic HTML on the client. IE 4 and later supports data islands, units of XML data within a Web page.
An XML
data island uses an
rel="stylesheet">
Data Island: Inline
There are several structural details to notice about this HTM file:
- The
tag delineates well-formed XML data that is embedded in the page. - The
tag's id attribute names the data island xmlCustomers so you can refer to the data in client or server code. - This example uses a data source object - a feature of IE for processing data records - to automatically parse and use the XML data.
The figure below shows how IE displays this page. The HTML table reads the XML data, referring to the defined name xmlCustomers to populate the table cells.
There are two other ways to use data islands in Internet Explorer: using the
Data Island: DOM
ondatasetcomplete="ShredXML();">