Package org.jdom.input
Class DOMBuilder
- java.lang.Object
-
- org.jdom.input.DOMBuilder
-
public class DOMBuilder extends java.lang.ObjectBuilds a JDOMorg.jdom.Documentfrom a pre-existing DOMorg.w3c.dom.Document. Also handy for testing builds from files to sanity checkSAXBuilder.- Version:
- $Revision: 1.60 $, $Date: 2007/11/10 05:29:00 $
- Author:
- Brett McLaughlin, Jason Hunter, Philip Nelson, Kevin Regan, Yusuf Goolamabbas, Dan Schaffer, Bradley S. Huffman
-
-
Constructor Summary
Constructors Constructor Description 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.DOMBuilder(java.lang.String adapterClass)This creates a new DOMBuilder using the specified DOMAdapter implementation as a way to choose the underlying parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Documentbuild(org.w3c.dom.Document domDocument)This will build a JDOM tree from an existing DOM tree.Elementbuild(org.w3c.dom.Element domElement)This will build a JDOM Element from an existing DOM ElementJDOMFactorygetFactory()Returns the currentJDOMFactoryin use.voidsetFactory(JDOMFactory factory)
-
-
-
Constructor Detail
-
DOMBuilder
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.
-
DOMBuilder
public DOMBuilder(java.lang.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.- Parameters:
adapterClass-Stringname of class to use for DOM building.
-
-
Method Detail
-
setFactory
public void setFactory(JDOMFactory factory)
-
getFactory
public JDOMFactory getFactory()
Returns the currentJDOMFactoryin use.- Returns:
- the factory in use
-
build
public Document build(org.w3c.dom.Document domDocument)
This will build a JDOM tree from an existing DOM tree.- Parameters:
domDocument-org.w3c.dom.Documentobject- Returns:
Document- JDOM document object.
-
build
public Element build(org.w3c.dom.Element domElement)
This will build a JDOM Element from an existing DOM Element- Parameters:
domElement-org.w3c.dom.Elementobject- Returns:
Element- JDOM Element object
-
-