public class DOMReader
extends java.lang.Object
DOMReader
navigates a W3C DOM tree and creates a DOM4J tree
from it.
Modifier and Type | Field and Description |
---|---|
private DocumentFactory |
factory
DocumentFactory used to create new document objects |
private NamespaceStack |
namespaceStack
stack of
Namespace and QName objects |
Constructor and Description |
---|
DOMReader() |
DOMReader(DocumentFactory factory) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearNamespaceStack() |
protected Document |
createDocument() |
DocumentFactory |
getDocumentFactory()
DOCUMENT ME!
|
protected Namespace |
getNamespace(java.lang.String prefix,
java.lang.String uri) |
private java.lang.String |
getPrefix(java.lang.String xmlnsDecl) |
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 the
DocumentFactory used to create new
documents. |
private DocumentFactory factory
DocumentFactory
used to create new document objectsprivate NamespaceStack namespaceStack
Namespace
and QName
objectspublic DOMReader()
public DOMReader(DocumentFactory factory)
public DocumentFactory getDocumentFactory()
DocumentFactory
used to create document
objectspublic 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 of
DocumentFactory
docFactory
- DocumentFactory
used to create DOM4J objectspublic Document read(org.w3c.dom.Document domDocument)
protected void readTree(org.w3c.dom.Node node, Branch current)
protected void readElement(org.w3c.dom.Node node, Branch current)
protected Namespace getNamespace(java.lang.String prefix, java.lang.String uri)
protected Document createDocument()
protected void clearNamespaceStack()
private java.lang.String getPrefix(java.lang.String xmlnsDecl)