O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using XML Data Islands

As of version 5 in Internet Explorer, you can also use XML data islands to actually embed XML inside HTML pages. Internet Explorer supports an HTML <XML> element (which is not part of the HTML standard) that you can simply enclose an XML document inside, like this:

<XML ID="greeting"> 
    <DOCUMENT>
        <GREETING>Hi there XML!</GREETING>
    </DOCUMENT>
</XML>

The Internet Explorer <XML> element has some attributes worth noting:

  • ID— The ID with which you can refer to the <XML> element in code. Set to an alphanumeric string.

  • NS— The URI of the XML namespace used by the XML content. Set to a URI.

  • PREFIX— Namespace prefix of the XML contents. Set to an alphanumeric string.

  • SRC— Source for the XML document, if the document is external. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required