|
JDOM 2.0.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DOMAdapter
Defines a standard set of adapter methods for interfacing with a DOM parser
and obtaining a DOM org.w3c.dom.Document object.
Instances of this interface are used by the DOMOutputter class to
create a DOM output result using the org.w3c.dom.Document implementation
returned by these methods.
You should never need to implement this interface unless you have a specific need to use something other than the default JAXP-based mechanism.
JDOM only provides one 'concrete' implementation of the DOMAdapter: the
JAXPDOMAdapter class. That implementation is a thread-safe and
efficient implementation. It can be used as a template for building your own
custom DOMAdapter implementation, if you need it.
The AbstractDOMAdapter class could help you by implementing the
DocType-based method which leverages the base createDocument() method.
Special note for implementation of DOMAdapter: For backward compatibility with JDOM 1.x (which allows a class-name to be used to specify a DOMAdapter in the DOMOoutputter class), it is required that your implementations of DOMAdapter have a no-argument default constructor. If you require a constructor argument then you have to ensure that you use the correct (non-deprecated) mechanisms on DOMOutputter to specify your custom DOMAdapter.
| Method Summary | |
|---|---|
org.w3c.dom.Document |
createDocument()
This creates an empty Document object based
on a specific parser implementation. |
org.w3c.dom.Document |
createDocument(DocType doctype)
This creates an empty Document object based
on a specific parser implementation with the given DOCTYPE. |
| Method Detail |
|---|
org.w3c.dom.Document createDocument()
throws JDOMException
Document object based
on a specific parser implementation.
Document - created DOM Document.
JDOMException - if an error occurs.
org.w3c.dom.Document createDocument(DocType doctype)
throws JDOMException
Document object based
on a specific parser implementation with the given DOCTYPE.
doctype - Initial DocType of the document.
Document - created DOM Document.
JDOMException - if an error occurs.
|
JDOM 2.0.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||