Previous Home Next

XML DSO 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, each of which contains a list of ORDERS, each of which contains 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 hierarchy in the XML data:

<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. Terms of use.