Extensible Markup Language Previous
Previous
Welcome
Welcome
Next
Next

XML Data Source Object Sample

The com.ms.xml.dso package contains an applet called XMLDSO that can be used as an XML data provider for the Data Binding features of Internet Explorer 4.0 which you will find under the "Dynamic HTML" topic under "Authoring for the Desktop & Web".

The APPLET tag usually has the following structure:

<APPLET
    class=com.ms.xml.dso.XMLDSO.class 
    id=xmldso 
    width=0
    height=0
    mayscript=true>
    <PARAM NAME=URL VALUE=...>
    <PARAM NAME=SCHEMA VALUE=...>
    ...optional inline XML...
</APPLET>

NOTE: if you want to see debugging information displayed by the APPLET give the APPLET a non-zero width and height.

The APPLET parameters are as follows:
URLA relative or absolute URL that points to an XML file. Typically this data comes from the same place as the HTML page containing the APPLET tag. In fact, Java security requires this unless it is an absolute HTTP address in which case any HTTP address is ok.
SCHEMAAn optional hand crafted schema for those occasions that the automatically generated schema is not good enough.
inline XMLThe XML can be placed inside the APPLET so that you don't have to make another HTTP request to get the data. Example 2 shows this in action.

The following are some example pages that show how the applet works:
Example1.htmA simple HTML table populated by external XML file.
Example2.htmThe same table populated by inline XML data.
Example3.htmNested HTML tables populated by hierarchical XML data.
Example4.htmUse of a SCHEMA to normalize irregular data.
Example5.htmEditing the XML using bound INPUT fields.
Example6.htmReport writer style of binding.
Example7.htmAccessing XML Object Model through JavaScript.
Example8.htmViewing XML data record at a time using recordset Object Model.


Top © 1996-1997 Microsoft Corporation. All rights reserved.