Microsoft XML Data Source Object Applet

The XML Data Source ActiveX Object can be inserted into an HTML page as follows:

<OBJECT width=0 height=0
    classid="clsid:550dda30-0541-11d2-9ca9-0060b0ec3d39"
    id="xmldso">
</OBJECT>
This can be used as an XML data provider in conjunction with the data binding features of Internet Explorer 4.0. for binding XML data to HTML element on the page.

To load XML into the DSO use the XMLDocument property to get a DOM object model then call the load method, as follows:

<SCRIPT for=window event=onload>
    var doc = xmldso.XMLDocument;
    doc.load("books.xml");
    if (doc.documentNode == null)
    {
        HandleError(doc);
    }
</SCRIPT>

Inline XML

You can also provide the XML inline inside the OBJECT tag in which cas you can load the DSO as follows:
<SCRIPT for=window event=onload>
    var doc = xmldso.XMLDocument;
    doc.loadXML(xmldso.altHtml);
    if (doc.documentNode == null)
    {
        HandleError(doc);
    }
</SCRIPT>

Examples

The following example pages show how the applet works:

© 1997 Microsoft Corporation. All rights reserved. Terms of use.