Previous Next

XML Data Source Applet

Example 3

This example shows how the XML DSO can be used to bind nested tables to hierarchical XML data. Click the Show XML Data button below to see this data. The XML data contains a list of CUSTOMERS which each contain a list of ORDERS, which each contain a list of ITEMS. In all, three levels of repetition bound to three nested tables.

The applet tag in this example is as follows:

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

And then I have three nested tables that bind to the three nested ROWSETS defined in the above schema as follows:

<table id=table datasrc=#xmldso border=2 width=100% cellpadding=3> <tr><td valign=top> <div datafld=NAME></div> <td valign=top> <table border=2 width=100% cellpadding=3 datasrc=#xmldso datafld=ORDER> <tr><td valign=top><div datafld=DATE dataformatas=HTML> <td valign=top><table border=2 width=100% cellpadding=3 datasrc=#xmldso datafld=ORDER.ITEM> <tr><td valign=top><div datafld=TITLE dataformatas=HTML> <td valign=top><div datafld=AUTHOR dataformatas=HTML> <td valign=top><div datafld=PRICE dataformatas=HTML> </table> </table> </table>

The XML DSO Source Code is in Java.


© 1997 Microsoft Corporation. All rights reserved. Legal Notices.