Package org.dom4j.io
Class DOMReader
- java.lang.Object
-
- org.dom4j.io.DOMReader
-
public class DOMReader extends java.lang.Object
DOMReader
navigates a W3C DOM tree and creates a DOM4J tree from it.
-
-
Constructor Summary
Constructors Constructor Description DOMReader()
DOMReader(DocumentFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
clearNamespaceStack()
protected Document
createDocument()
DocumentFactory
getDocumentFactory()
DOCUMENT ME!protected Namespace
getNamespace(java.lang.String prefix, java.lang.String uri)
Document
read(org.w3c.dom.Document domDocument)
protected void
readElement(org.w3c.dom.Node node, Branch current)
protected void
readTree(org.w3c.dom.Node node, Branch current)
void
setDocumentFactory(DocumentFactory docFactory)
This sets theDocumentFactory
used to create new documents.
-
-
-
Constructor Detail
-
DOMReader
public DOMReader()
-
DOMReader
public DOMReader(DocumentFactory factory)
-
-
Method Detail
-
getDocumentFactory
public DocumentFactory getDocumentFactory()
DOCUMENT ME!- Returns:
- the
DocumentFactory
used to create document objects
-
setDocumentFactory
public void setDocumentFactory(DocumentFactory docFactory)
This sets the
DocumentFactory
used to create new documents. This method allows the building of custom DOM4J tree objects to be implemented easily using a custom derivation ofDocumentFactory
- Parameters:
docFactory
-DocumentFactory
used to create DOM4J objects
-
read
public Document read(org.w3c.dom.Document domDocument)
-
readTree
protected void readTree(org.w3c.dom.Node node, Branch current)
-
readElement
protected void readElement(org.w3c.dom.Node node, Branch current)
-
getNamespace
protected Namespace getNamespace(java.lang.String prefix, java.lang.String uri)
-
createDocument
protected Document createDocument()
-
clearNamespaceStack
protected void clearNamespaceStack()
-
-