xml (XML Data Island)
This proprietary element introduced by Microsoft can be used to embed islands of xml (Extensible Markup Language) data into HTML documents; this will work only under Internet Explorer 5.0 or later. The <xml> element can be used to reference outside data sources using the src attribute, or surround XML data in the HTML document itself.
Syntax (defined by Internet Explorer 5.0)
<xml
id="unique alphanumeric value"</xml>
src="url of xml data file"
...embedded xml code...
Events Defined by Internet Explorer
ondataavailable, ondatasetchanged, ondatasetcomplete, onreadystatechange, onrowenter, onrowexit, onrowsdelete, onrowsinserted
Element-Specific Attributes
- src
- This attribute references an external xml data file.
Examples
<!-- This code embeds xml data directly into a document.
All code between the xml tags is not HTML, but a
hypothetical example of xml. -->
<xml id="tasty">
<combomeal>
<burger>
<name>Tasty Burger</name>
<bun bread="white">
<meat />
<cheese />
<meat />
</bun>
</burger>
<fries size="large" />
<drink size="large" flavor="Cola" />
</combomeal>
</xml>
<!-- This code fragment uses the src attribute to reference an
external file containing xml data. -->
<xml src="combomeal.xml"></xml>
Compatibility
No Standards Support
Internet Explorer 5, 5.5 6
Notes
Support for the <xml> tag is limited to Internet Explorer 5 or better. Mozilla's approach is more focused on embedding HTML within XML documents.
For a more detailed discussion of the element and demonstrations of its use, refer to "Embedding XML into HTML Documents" in Chapter 18.