XML Data Source Object Samples

These samples are located in \Samples\Scripting\Xmldso.

Description
Using the Sample
Key Project Files
Technologies Demonstrated

Description

This sample shows how to use the XMLDSO applet (provided by the com.ms.xml.dso package) as an XML data provider for the data binding features of Microsoft® Internet Explorer 4.0. For more information on data binding, see the documentation for Microsoft Internet Explorer 4.0.

You must have Microsoft Internet Explorer 4.0 or later installed to run these samples.

Additional Information

The <APPLET> tag used with the XMLDSO applet 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 the applet to display debugging information, specify a non-zero width and height.

The <APPLET> parameters are as shown in the following table.

URL A 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. Java security requires this unless it is an absolute HTTP address, in which case, any HTTP address is acceptable.
SCHEMA An optional, custom schema used when the automatically generated schema is not adequate.
inline XML The XML can be placed inside the APPLET. This eliminates the need to make another HTTP request to get the data. Example 2 demonstrates this.

Using the Samples

To run the samples

Click the appropriate button to run the following sample HTML files from Internet Explorer 4.0 or later.

A simple HTML table populated by an external XML file.
The same table populated by inline XML data.
Nested HTML tables populated by hierarchical XML data.
Use of a SCHEMA to normalize irregular data.
Editing the XML using bound INPUT fields.
Report writer style of binding.
Accessing the XML Object Model through JavaScript.
Viewing one XML data record at a time using the recordset Object Model.

Key Project Files

This applet can be used in an <APPLET> tag to load XML files and provide that data for data binding.

\Samples\Scripting\xmldso directory – *.xml files

These XML data files contain the data for the sample.

\Samples\Scripting\xmldso directory – xmldso_example1.htm – xmldso_example8.htm

These HTML files show how to use the Java XMLDSO applet with the XML data files.

Technologies Demonstrated

Java XML DSO Data Source Provider

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