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
public XMLDSO();
Constructs an XMLDSO object with an empty document.
public void addDataSourceListener(DataSourceListener listener)
throws java.util.TooManyListenersException;
Adds a DataSourceListener object to the XMLDSO object.
Return Value:
No return value.
Parameter | Description |
listener
| The listener to add to the DSO.
|
Exceptions:
TooManyListenersException
if too many listeners are associated with the Data Source Object (DSO).
public void clear();
Replaces the currently loaded document with a new, empty document.
Return Value:
No return value.
public Object getDocument();
Retrieves the loaded document.
Return Value:
Returns the loaded document.
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.
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.
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.
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.
Parameter | Description |
arg
| A String that contains the URL used to reload the document.
|
public OLEDBSimpleProvider msDataSourceObject(String qualifier);
Provides the OLE-DB Simple Provider Interface to callers.
Return Value:
Returns an OLEDBSimpleProvider object.
Parameter | Description |
qualifier
| This parameter is currently ignored, but is available to enable the applet to serve more than one data set.
|
public void notifyListeners();
Notifies current DataSouceListener objects associated with the XMLDSO that data has changed.
Return Value:
No return value.
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.
Parameter | Description |
g
| The graphics context to use to paint the applet.
|
public void removeDataSourceListener( DataSourceListener listener);
Removes a DataSourceListener object from the XMLDSO object.
Return Value:
No return value.
Parameter | Description |
listener
| The listener to remove from the DSO.
|
public void save(String filename);
Saves the XML document to a file.
Return Value:
No return value.
Parameter | Description |
filename
| The name of the file to save the XML document to.
|
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.
Parameter | Description |
e
| The Element to set as the root of the document.
|
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.