Previous Home Next

XML DSO Applet

Example 7

This example shows how the JavaScript recordset interface can be used to walk through some XML data, one node at a time.
TITLE
AUTHOR
PUBLISHER
PRICE
QUANTITY

In this case, the data binding is done as follows:

<table bgcolor=#dddddd border=2 width=100% cellpadding=3> <tr><td><b>TITLE</b> <td><span datasrc=#xmldso datafld=TITLE></span> <tr><td><b>AUTHOR</b> <td><span datasrc=#xmldso datafld=AUTHOR></span> <tr><td><b>PUBLISHER</b> <td><span datasrc=#xmldso datafld=PUBLISHER></span> <tr><td><b>PRICE</b> <td><span datasrc=#xmldso datafld=PRICE></span> <tr><td><b>QUANTITY</b> <td><span datasrc=#xmldso datafld=QUANTITY></span> </table> And the code for the buttons that move the record set is as follows: <input type=button value="Previous" onclick='xmldso.recordset.moveprevious()'> <input type=button value="Next" onclick='xmldso.recordset.movenext()'>

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