|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface describes a document object which provides access to XML data
in several ways. When the underlying object is a stored document, it also
supports a number of document management methods also available in the
XMLCollection interface.
Method Summary | |
org.w3c.dom.Document |
getAsDocument()
Returns the document content as a DOM2 Document. |
org.w3c.dom.Document |
getAsDOM()
Deprecated. New method name is getAsDocument() |
void |
getAsDOM(org.w3c.dom.Element parent)
Attaches a DOM2 fragment corresponding to the XML document to the Element node passed as a parameter. |
void |
getAsSAX()
Returns the document content as a SAX2 event flow. |
void |
getAsStream(java.io.Writer out)
Returns the document content in a provided character stream. |
java.lang.String |
getAsString()
Returns the document content as an XML string. |
XMLCollection |
getCollection()
Returns the XML collection to which this document belongs. |
org.xml.sax.ContentHandler |
getContentHandler()
Retrieves the current (SAX2) content handler. |
org.xml.sax.ErrorHandler |
getErrorHandler()
SRetrieves the current (SAX2) error handler. |
java.lang.String |
getIdentifier()
Returns the document identifier in the XML collection. |
org.xml.sax.ext.LexicalHandler |
getLexicalHandler()
Retrieves the current (SAX2) lexical handler. |
void |
remove()
Removes the document from the collection to which it belongs. |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Sets a (SAX2) content handler to intercept events produced when retrieving the document content. |
void |
setErrorHandler(org.xml.sax.ErrorHandler handler)
Sets a (SAX2) error handler to intercept error events produced when retrieving the document content. |
void |
setIdentifier(java.lang.String identifier)
Changes the document identifier in the XML collection. |
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Sets a (SAX2) lexical handler to intercept events produced when retrieving the document content. |
Method Detail |
public java.lang.String getIdentifier()
public void setIdentifier(java.lang.String identifier) throws XMLDBCException, XMLDBCNotSupportedException
XMLDBCException
- if a data source access error occurs.
XMLDBCNotSupportedException
- if the renaming operation is not supported.public XMLCollection getCollection()
public void remove() throws XMLDBCException, XMLDBCNotSupportedException
XMLDBCException
- if a data source access error occurs.
XMLDBCNotSupportedException
- if the remove operation is not supported.public void setContentHandler(org.xml.sax.ContentHandler handler)
*** ONLY FOR SAX2 ***
handler
- the content handler implementation (see org.xml.sax.ContentHandler)public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
*** ONLY FOR SAX2 ***
handler
- the lexical handler implementation (see org.xml.sax.ext.LexicalHandler)public void setErrorHandler(org.xml.sax.ErrorHandler handler)
*** ONLY FOR SAX2 ***
handler
- the error handler implementation (see org.xml.sax.ErrorHandler)public org.xml.sax.ContentHandler getContentHandler()
*** ONLY FOR SAX2 ***
public org.xml.sax.ext.LexicalHandler getLexicalHandler()
*** ONLY FOR SAX2 ***
public org.xml.sax.ErrorHandler getErrorHandler()
*** ONLY FOR SAX2 ***
public org.w3c.dom.Document getAsDocument() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public org.w3c.dom.Document getAsDOM() throws XMLDBCException
getAsDocument()
XMLDBCException
- if a data source access error occurs.public void getAsDOM(org.w3c.dom.Element parent) throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public java.lang.String getAsString() throws XMLDBCException
XMLDBCException
- if a data source access error occurs.public void getAsStream(java.io.Writer out) throws XMLDBCException
out
- a Writer
object assuming user is
responsible for the character encoding.
XMLDBCException
- if a data source access error occurs.public void getAsSAX() throws XMLDBCException, org.xml.sax.SAXException
*** ONLY FOR SAX2 ***
XMLDBCException
- if a data source access error occurs
or if the user has not set a content handler.
org.xml.sax.SAXException
- if a handler exception occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |