All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----org.jdom.input.DOMBuilder
DOMBuilder
builds a JDOM tree using DOM.
Note that this class should only be used for building from a pre-existing
DOM tree. The class can be used to build from files, streams, etc but
other builders like SAXBuilder can perform the task faster because
they don't create a DOM tree first.
This creates a new DOMBuilder which will attempt to first locate a parser via JAXP, then will try to use a set of default parsers.
This creates a new DOMBuilder which will attempt to first locate a parser via JAXP, then will try to use a set of default parsers.
This creates a new DOMBuilder using the specified DOMAdapter implementation as a way to choose the underlying parser.
This creates a new DOMBuilder using the specified DOMAdapter implementation as a way to choose the underlying parser.
This will build a JDOM tree from an existing DOM tree.
This will build a JDOM Element from an existing DOM Element
This builds a document from the supplied filename by constructing a DOM tree and reading information from the DOM to create a JDOM document, a slower approach than SAXBuilder but useful for debugging. Deprecated.
This builds a document from the supplied input stream by constructing a DOM tree and reading information from the DOM to create a JDOM document, a slower approach than SAXBuilder but useful for debugging. Deprecated.
This builds a document from the supplied URL by constructing a DOM tree and reading information from the DOM to create a JDOM document, a slower approach than SAXBuilder but useful for debugging. Deprecated.
This sets validation for the builder.
public DOMBuilder()
This creates a new DOMBuilder which will attempt to first locate a parser via JAXP, then will try to use a set of default parsers. The underlying parser will not validate.
public DOMBuilder(boolean validate)
This creates a new DOMBuilder which will attempt to first locate a parser via JAXP, then will try to use a set of default parsers. The underlying parser will validate or not according to the given parameter.
boolean
indicating if
validation should occur.
public DOMBuilder(String adapterClass)
This creates a new DOMBuilder using the specified DOMAdapter implementation as a way to choose the underlying parser. The underlying parser will not validate.
String
name of class
to use for DOM building.
public DOMBuilder(String adapterClass, boolean validate)
This creates a new DOMBuilder using the specified DOMAdapter implementation as a way to choose the underlying parser. The underlying parser will validate or not according to the given parameter.
String
name of class
to use for DOM building.
boolean
indicating if
validation should occur.
public void setFactory(JDOMFactory factory)
public void setValidation(boolean validate)
This sets validation for the builder.
boolean
indicating whether validation
should occur.
public Document build(InputStream in) throws JDOMException
{@link SAXBuilder}
should be used for building from any input other than a
DOM tree
This builds a document from the supplied input stream by constructing a DOM tree and reading information from the DOM to create a JDOM document, a slower approach than SAXBuilder but useful for debugging.
InputStream
to read from.
Document
- resultant Document object.
public Document build(File file) throws JDOMException
{@link SAXBuilder}
should be used for building from any input other than a
DOM tree
This builds a document from the supplied filename by constructing a DOM tree and reading information from the DOM to create a JDOM document, a slower approach than SAXBuilder but useful for debugging.
File
to read from.
Document
- resultant Document object.
public Document build(URL url) throws JDOMException
{@link SAXBuilder}
should be used for building from any input other than a
DOM tree
This builds a document from the supplied URL by constructing a DOM tree and reading information from the DOM to create a JDOM document, a slower approach than SAXBuilder but useful for debugging.
URL
to read from.
Document
- resultant Document object.
public Document build(Document domDocument)
This will build a JDOM tree from an existing DOM tree.
org.w3c.dom.Document
object
Document
- JDOM document object.
public Element build(Element domElement)
This will build a JDOM Element from an existing DOM Element
org.w3c.dom.Element
object
Element
- JDOM Element object
All Packages Class Hierarchy This Package Previous Next Index