Class XMLDSO

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

  // Methods
  public void addDataSourceListener(
        DataSourceListener listener)
        throws java.util.TooManyListenersException;
  public void asyncLoad(String arg, String callback);
  public void clear();
  public Object getDocument();
  public String getError();
  public Object getSchema(int style);
  public Object getXML(int style);
  public void handleUpdate(Element root);
  public void handleUpdateString(String xml);
  public void init();
  public void load(String arg);
  public OLEDBSimpleProvider msDataSourceObject(String qualifier);
  public void notifyListeners();
  public void paint(Graphics g);
  public Document parseXML(String xml);
  public void removeDataSourceListener(
        DataSourceListener listener);
  public void save(String filename);
  public void saveSchema(String filename);
  public void setRoot(Element e);
  public void updateSchema();
}

An XMLDSO is an applet that can be used in an APPLET tag to load XML files and provide that data to for data binding. See IE 4.0 documentation for more information on data binding.

Also see Document, Element

>Applet
  |
  +--XMLDSO

Constructors

XMLDSO

public XMLDSO();

Construct a new XMLDSO object with an empty document.

Methods

addDataSourceListener 

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

This is a standard method for DSO's.

asyncLoad 

public void asyncLoad(String arg, String callback);

clear 

public void clear();

getDocument 

public Object getDocument();

Return the loaded document.

getError 

public String getError();

Return string containing last error encountered by the XMLDSO.

getSchema 

public Object getSchema(int style);

Return the schema as a string.

getXML 

public Object getXML(int style);

Return the XML for the loaded document as a big string. Pass in the formatting style. 0=default, 1=pretty, 2=compact.

handleUpdate 

public void handleUpdate(Element root);

Process the given update gram

handleUpdateString 

public void handleUpdateString(String xml);

Parse and Process the given update gram

init 

public void init();

The init method looks for a URL PARAM and loads this url if specified. Otherwise it looks for inline XML from inside the APPLET tag that created this XMLDSO object. It does this using the ID parameter of the APPLET tag to lookup the actual applet object in the page, using JSObject, an then getting the altHtml member of this object. Note: it is ok to not have a URL or any inline XML.

load 

public void load(String arg);

Reload the document using the given URL. Relative URL's are resolved using the HTML document as a base URL.

msDataSourceObject 

public OLEDBSimpleProvider msDataSourceObject(String qualifier);

Function to provide the OLE-DB simple provider interface to callers. The qualifier parameter is ignored at this point, but is available to allow the applet to serve up more than one data set

notifyListeners 

public void notifyListeners();

Notify current DataSouceListener that data has changed.

paint 

public void paint(Graphics g);

When the APPLET containing this XMLDSO is given a non-zero bounds this paint methods displays diagnostic information that helps the page author debug the page.

parseXML 

public Document parseXML(String xml);

removeDataSourceListener 

public void removeDataSourceListener(
        DataSourceListener listener);

This is a standard method for DSO's.

save 

public void save(String filename);

Save the XML document to the given file.

saveSchema 

public void saveSchema(String filename);

Save the schema to the given file.

setRoot 

public void setRoot(Element e);

This method is called to set the root of the document for this XMLDSO object. This is useful when you want to link multiple DSO's together.

updateSchema 

public void updateSchema();

This method is called whenever the document is changed, that is, from the load and setroot methods. You can also call this method if you have manually changed the document or the SCHEMA .