Previous Home Next

XML DSO Applet

Example 2

This example shows how the XML DSO can get the XML data from inside the APPLET tag in the HTML page instead of getting it from a separate file.

Number, the Language of Science Danzig 5.95 Tales of Grandpa Cat Wardlaw, Lee 6.58 Evolution of Complexity in Animal Culture Associated Press Bonner 5.95 When We Were Very Young Milne, A. A. 12.50 Learn Java Now Stephen R. Davis Microsoft Corporation 9.95 Design Patterns Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides Addison Wesley 49.95
Author Title Price Publisher

The APPLET tag used to invoke the XML DSO and load the XML data is as follows:

<applet code=com.ms.xml.dso.XMLDSO.class width=100% height=25 id=xmldso mayscript=true> <?XML VERSION="1.0"?> <BOOKS> <ITEM> <XTITLE>Number, the Language of Science</XTITLE> <AUTHOR>Danzig</AUTHOR> <PRICE>5.95</PRICE> </ITEM> <ITEM> <XTITLE>Tales of Grandpa Cat</XTITLE> <AUTHOR>Wardlaw, Lee</AUTHOR> <PRICE>6.58</PRICE> </ITEM> <ITEM> <XTITLE>Evolution of Complexity in Animal Culture</XTITLE> <PUBLISHER>Associated Press</PUBLISHER> <AUTHOR>Bonner</AUTHOR> <PRICE>5.95</PRICE> </ITEM> <ITEM> <XTITLE>When We Were Very Young</XTITLE> <AUTHOR>Milne, A. A.</AUTHOR> <PRICE>12.50</PRICE> </ITEM> <ITEM> <XTITLE>Learn Java Now</XTITLE> <AUTHOR>Stephen R. Davis</AUTHOR> <PUBLISHER>Microsoft Corporation</PUBLISHER> <PRICE>9.95</PRICE> </ITEM> <ITEM> <XTITLE>Design Patterns</XTITLE> <AUTHOR>Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides</AUTHOR> <PUBLISHER>Addison Wesley</PUBLISHER> <PRICE>49.95</PRICE> </ITEM> </BOOKS> </applet>

(Note: Currently the <TITLE> tag is not allowed inside inline XML so you will notice that I changed it to XTITLE.)

The TABLE that binds to the data is the same as in Example 1.

The XML DSO source code is in Java.

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