Package com.ms.xml.dso
 In this topic

*Constructors

*Methods

 

Packages
  PreviousThis Package
Package com.ms.xml.dso   Previous This
Package

 


Class XMLDSO

public class XMLDSO extends Applet
{
  // Constructors
  public XMLDSO();

  // Methods
  public void addDataSourceListener(DataSourceListener listener)
        throws java.util.TooManyListenersException;
  public void clear();
  public Object getDocument();
  public String getError();
  public Object getXML();
  public void init();
  public void load(String arg);
  public OLEDBSimpleProvider msDataSourceObject(String qualifier);
  public void notifyListeners();
  public void paint(Graphics g);
  public void removeDataSourceListener( DataSourceListener listener);
  public void save(String filename);
  public void setRoot(Element e);
  public void updateSchema();
}

This class is an applet that can be used with an <APPLET> tag to load XML files and provide the data contained in these files for data binding.

Also see Document, Element

Applet
  |
  +--XMLDSO

Constructors

XMLDSO

public XMLDSO();

Constructs an XMLDSO object with an empty document.

Methods

addDataSourceListener

public void addDataSourceListener(DataSourceListener listener)
        throws java.util.TooManyListenersException;

Adds a DataSourceListener object to the XMLDSO object.

Return Value:

No return value.

ParameterDescription
listener The listener to add to the DSO.

Exceptions:

TooManyListenersException if too many listeners are associated with the Data Source Object (DSO).

clear

public void clear();

Replaces the currently loaded document with a new, empty document.

Return Value:

No return value.

getDocument

public Object getDocument();

Retrieves the loaded document.

Return Value:

Returns the loaded document.

getError

public String getError();

Retrieves a string containing last error encountered by the XMLDSO object.

Return Value:

Returns a String that describes the last error that was encountered.

getXML

public Object getXML();

Retrieves the XML for the loaded document as a large string.

Return Value:

Returns a string object that contains the XML contents of the loaded document.

init

public void init();

Searches for a PARAM with a URL and loads this URL if found. Otherwise, it looks for inline XML inside the <APPLET> tag that created the current XMLDSO object.

Return Value:

No return value.

Remarks:

If no URL or inline XML exists, the method performs no action.

load

public void load(String arg);

Reloads the document using the specified URL. Relative URLs are resolved using the HTML document as a base for the URL.

Return Value:

No return value.

ParameterDescription
arg A String that contains the URL used to reload the document.

msDataSourceObject

public OLEDBSimpleProvider msDataSourceObject(String qualifier);

Provides the OLE-DB Simple Provider Interface to callers.

Return Value:

Returns an OLEDBSimpleProvider object.

ParameterDescription
qualifier This parameter is currently ignored, but is available to enable the applet to serve more than one data set.

notifyListeners

public void notifyListeners();

Notifies current DataSouceListener objects associated with the XMLDSO that data has changed.

Return Value:

No return value.

paint

public void paint(Graphics g);

Displays diagnostic information that helps the page author debug the page if the applet that contains the XMLDSO is given bounds that are non-zero.

Return Value:

No return value.

ParameterDescription
g The graphics context to use to paint the applet.

removeDataSourceListener

public void removeDataSourceListener( DataSourceListener listener);

Removes a DataSourceListener object from the XMLDSO object.

Return Value:

No return value.

ParameterDescription
listener The listener to remove from the DSO.

save

public void save(String filename);

Saves the XML document to a file.

Return Value:

No return value.

ParameterDescription
filename The name of the file to save the XML document to.

setRoot

public void setRoot(Element e);

Sets the root of the document for this XMLDSO object. This is useful when you want to link together multiple DSOs.

Return Value:

No return value.

ParameterDescription
e The Element to set as the root of the document.

updateSchema

public void updateSchema();

Updates the SCHEMA whenever the document is changed. The method is called from the clear, load, and setRoot methods, but you can also call this method if you have manually changed the document or the SCHEMA <PARAM>. The SCHEMA <PARAM> is used to define a subset of data that is visible through the DSO.

Return Value:

No return value.

upnrm.gif