org.xmldb.api.sdk.modules
public abstract class SimpleXMLResource extends BaseResource implements XMLResource
String content.
| Field Summary | |
|---|---|
| protected String | content |
| protected String | documentID |
| Constructor Summary | |
|---|---|
| SimpleXMLResource(Collection parent, String id, String documentID)
Create a new XMLResource without any content. | |
| SimpleXMLResource(Collection parent, String id, String documentID, String content)
Create a fully initialized XMLResource | |
| Method Summary | |
|---|---|
| Object | getContent()
Retrieves the content from the resource. |
| Node | getContentAsDOM()
Returns the content of the Resource as a DOM Node.
|
| void | getContentAsSAX(ContentHandler handler)
Allows you to use a ContentHandler to parse the XML data from
the database for use in an application.
|
| String | getDocumentId()
Returns the ID for the parent document of this resource. |
| String | getResourceType()
Returns the resource type for this Resource.
|
| void | setContent(Object value)
Sets the content for this resource. |
| void | setContentAsDOM(Node content)
Sets the content of the Resource using a DOM Node as the
source.
|
| ContentHandler | setContentAsSAX()
Sets the content of the Resource using a SAX
ContentHandler.
|
Returns: the content of the resource.
Resource as a DOM Node.
Returns: The XML content as a DOM Node
ContentHandler to parse the XML data from
the database for use in an application.
Parameters: handler the SAX ContentHandler to use to handle the
Resource content.
Returns: the resource type for the Resource.
Parameters: value the content value to set for the resource.
Resource using a DOM Node as the
source.
Parameters: content The new content value
Resource using a SAX
ContentHandler.
Returns: a SAX ContentHandler that can be used to add content
into the Resource.