| org.jdom.adapters.DOMAdapter
All known Subclasses: org.jdom.adapters.AbstractDOMAdapter,
DOMAdapter | public interface DOMAdapter (Code) | | Defines a standard set of adapter methods for interfacing with a DOM parser
and obtaining a DOM
org.w3c.dom.Document org.w3c.dom.Document object.
Implementing classes map these calls to DOM parser-specific calls, allowing
any third-party parser to be used with JDOM.
version: $Revision: 1.1 $, $Date: 2005/04/27 09:32:43 $ author: Brett McLaughlin author: Jason Hunter |
Method Summary | |
public Document | createDocument() This creates an empty Document object based
on a specific parser implementation. | public Document | createDocument(DocType doctype) This creates an empty Document object based
on a specific parser implementation with the given DOCTYPE.
Parameters: doctype - Initial DocType of the document. | public Document | getDocument(File filename, boolean validate) This creates a new Document from a
given filename by letting a DOM parser handle parsing from the file.
Parameters: filename - file to parse. Parameters: validate - boolean to indicate if validation should occur. | public Document | getDocument(InputStream in, boolean validate) This creates a new Document from an
existing InputStream by letting a DOM
parser handle parsing using the supplied stream.
Parameters: in - InputStream to parse. Parameters: validate - boolean to indicate if validation should occur. |
createDocument | public Document createDocument() throws JDOMException(Code) | | This creates an empty Document object based
on a specific parser implementation.
Document - created DOM Document. throws: JDOMException - when errors occur. |
createDocument | public Document createDocument(DocType doctype) throws JDOMException(Code) | | This creates an empty Document object based
on a specific parser implementation with the given DOCTYPE.
Parameters: doctype - Initial DocType of the document. Document - created DOM Document. throws: JDOMException - when errors occur. |
getDocument | public Document getDocument(File filename, boolean validate) throws IOException, JDOMException(Code) | | This creates a new Document from a
given filename by letting a DOM parser handle parsing from the file.
Parameters: filename - file to parse. Parameters: validate - boolean to indicate if validation should occur. Document - instance ready for use. throws: IOException - when I/O error occurs. throws: JDOMException - when errors occur in parsing. |
getDocument | public Document getDocument(InputStream in, boolean validate) throws IOException, JDOMException(Code) | | This creates a new Document from an
existing InputStream by letting a DOM
parser handle parsing using the supplied stream.
Parameters: in - InputStream to parse. Parameters: validate - boolean to indicate if validation should occur. Document - instance ready for use. throws: IOException - when I/O error occurs. throws: JDOMException - when errors occur in parsing. |
|
|