Home Next

XML DSO Applet

Example 1

This example shows how the XML DSO can be used to bind XML data to an HTML table using the Internet Explorer 4.0 data binding architecture.
Author Title Price Publisher

The APPLET tag that invokes the XML DSO is shown below:

<applet code=com.ms.xml.dso.XMLDSO.class width=100% height=25 id=xmldso MAYSCRIPT=true> <PARAM NAME="url" VALUE="books.xml"> </applet>

The table the binds to the data that the XML DSO provides is shown below:

<table id=table border=2 width=100% datasrc=#xmldso cellpadding=5> <thead> <th>Author <th>Title <th>Price <th>Publisher </thead> <tr> <td valign=top><div datafld=AUTHOR dataformatas=HTML></td> <td valign=top><div datafld=TITLE dataformatas=HTML></td> <td valign=top><div datafld=PRICE dataformatas=HTML></td> <td valign=top><div datafld=PUBLISHER dataformatas=HTML></td> </tr> </table>

The XML data is retrieved from a separate XML file. Click the Show XML Data button below to see this data.

The interesting thing about this data is that it includes no schema (or DTD) and it is not completely regular. In particular, the PUBLISHER tags are randomly specified and the relative ordering of nodes in this data is not consistent.

The XML DSO source code is in Java.

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