| |
|
| org.xmldb.api.modules.XMLResource
All known Subclasses: org.ozoneDB.xml.cli.resources.XMLResourceImpl,
XMLResource | public interface XMLResource extends Resource(Code) | | Provides access to XML resources stored in the database. An XMLResource can
be accessed either as text XML or via the DOM or SAX APIs.
The default behavior for getContent and setContent is to work with XML data
as text so these methods work on String content. I.e. it is always
possible to do the following
if (resource instanceof XMLResource) {
String foo = (String)resource.getContent();
}
|
getContentAsDOM | Node getContentAsDOM() throws XMLDBException(Code) | | Returns the content of the Resource as a DOM Node.
The XML content as a DOM Node exception: XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.
|
getContentAsSAX | void getContentAsSAX(ContentHandler handler) throws XMLDBException(Code) | | Allows you to use a ContentHandler to parse the XML data from
the database for use in an application.
Parameters: handler - the SAX ContentHandler to use to handle theResource content. exception: XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.
ErrorCodes.INVALID_RESOURCE if the ContentHandler provided is null.
|
setContentAsDOM | void setContentAsDOM(Node content) throws XMLDBException(Code) | | Sets the content of the Resource using a DOM Node as the
source.
Parameters: content - The new content value exception: XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.
ErrorCodes.INVALID_RESOURCE if the content value provided isnull.
ErrorCodes.WRONG_CONTENT_TYPE if the content provided in nota valid DOM Node . |
setContentAsSAX | ContentHandler setContentAsSAX() throws XMLDBException(Code) | | Sets the content of the Resource using a SAX
ContentHandler .
a SAX ContentHandler that can be used to add contentinto the Resource . exception: XMLDBException - with expected error codes.
ErrorCodes.VENDOR_ERROR for any vendorspecific errors that occur.
|
|
|
|