org.dom4j.io
Class DOMWriter

java.lang.Object
  extended byorg.dom4j.io.DOMWriter

public class DOMWriter
extends java.lang.Object

DOMWriter takes a DOM4J tree and outputs it as a W3C DOM object

Version:
$Revision: 1.6 $
Author:
James Strachan

Constructor Summary
DOMWriter()
           
DOMWriter(java.lang.Class domDocumentClass)
           
 
Method Summary
protected  void appendDOMTree(org.w3c.dom.Document domDocument, org.w3c.dom.Node domCurrent, CDATA cdata)
           
protected  void appendDOMTree(org.w3c.dom.Document domDocument, org.w3c.dom.Node domCurrent, Comment comment)
           
protected  void appendDOMTree(org.w3c.dom.Document domDocument, org.w3c.dom.Node domCurrent, Element element)
           
protected  void appendDOMTree(org.w3c.dom.Document domDocument, org.w3c.dom.Node domCurrent, Entity entity)
           
protected  void appendDOMTree(org.w3c.dom.Document domDocument, org.w3c.dom.Node domCurrent, java.util.List content)
           
protected  void appendDOMTree(org.w3c.dom.Document domDocument, org.w3c.dom.Node domCurrent, ProcessingInstruction pi)
           
protected  void appendDOMTree(org.w3c.dom.Document domDocument, org.w3c.dom.Node domCurrent, java.lang.String text)
           
protected  java.lang.String attributeNameForNamespace(Namespace namespace)
           
protected  org.w3c.dom.Document createDomDocument(Document document)
           
protected  org.w3c.dom.Document createDomDocument(Document document, org.w3c.dom.DOMImplementation domImplementation)
           
protected  org.w3c.dom.Document createDomDocumentViaJAXP()
           
 java.lang.Class getDomDocumentClass()
           
protected  boolean isNamespaceDeclaration(Namespace ns)
           
protected  void resetNamespaceStack()
           
 void setDomDocumentClass(java.lang.Class domDocumentClass)
          Sets the DOM Document implementation class used by the writer when creating DOM documents.
 void setDomDocumentClassName(java.lang.String className)
          Sets the DOM Document implementation class name used by the writer when creating DOM documents.
 org.w3c.dom.Document write(Document document)
           
 org.w3c.dom.Document write(Document document, org.w3c.dom.DOMImplementation domImplementation)
           
protected  void writeNamespace(org.w3c.dom.Element domElement, Namespace namespace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMWriter

public DOMWriter()

DOMWriter

public DOMWriter(java.lang.Class domDocumentClass)
Method Detail

getDomDocumentClass

public java.lang.Class getDomDocumentClass()
                                    throws DocumentException
Throws:
DocumentException

setDomDocumentClass

public void setDomDocumentClass(java.lang.Class domDocumentClass)
Sets the DOM Document implementation class used by the writer when creating DOM documents.

Parameters:
domDocumentClass - is the Class implementing the Document interface

setDomDocumentClassName

public void setDomDocumentClassName(java.lang.String className)
                             throws DocumentException
Sets the DOM Document implementation class name used by the writer when creating DOM documents.

Parameters:
className - is the name of the Class implementing the Document interface
Throws:
DocumentException - if the class could not be loaded

write

public org.w3c.dom.Document write(Document document)
                           throws DocumentException
Throws:
DocumentException

write

public org.w3c.dom.Document write(Document document,
                                  org.w3c.dom.DOMImplementation domImplementation)
                           throws DocumentException
Throws:
DocumentException

appendDOMTree

protected void appendDOMTree(org.w3c.dom.Document domDocument,
                             org.w3c.dom.Node domCurrent,
                             java.util.List content)

appendDOMTree

protected void appendDOMTree(org.w3c.dom.Document domDocument,
                             org.w3c.dom.Node domCurrent,
                             Element element)

appendDOMTree

protected void appendDOMTree(org.w3c.dom.Document domDocument,
                             org.w3c.dom.Node domCurrent,
                             CDATA cdata)

appendDOMTree

protected void appendDOMTree(org.w3c.dom.Document domDocument,
                             org.w3c.dom.Node domCurrent,
                             Comment comment)

appendDOMTree

protected void appendDOMTree(org.w3c.dom.Document domDocument,
                             org.w3c.dom.Node domCurrent,
                             java.lang.String text)

appendDOMTree

protected void appendDOMTree(org.w3c.dom.Document domDocument,
                             org.w3c.dom.Node domCurrent,
                             Entity entity)

appendDOMTree

protected void appendDOMTree(org.w3c.dom.Document domDocument,
                             org.w3c.dom.Node domCurrent,
                             ProcessingInstruction pi)

writeNamespace

protected void writeNamespace(org.w3c.dom.Element domElement,
                              Namespace namespace)
Returns:
the new local namespace set which may be different from the input set if a new namespace is added to the set

attributeNameForNamespace

protected java.lang.String attributeNameForNamespace(Namespace namespace)

createDomDocument

protected org.w3c.dom.Document createDomDocument(Document document)
                                          throws DocumentException
Throws:
DocumentException

createDomDocumentViaJAXP

protected org.w3c.dom.Document createDomDocumentViaJAXP()
                                                 throws DocumentException
Throws:
DocumentException

createDomDocument

protected org.w3c.dom.Document createDomDocument(Document document,
                                                 org.w3c.dom.DOMImplementation domImplementation)
                                          throws DocumentException
Throws:
DocumentException

isNamespaceDeclaration

protected boolean isNamespaceDeclaration(Namespace ns)

resetNamespaceStack

protected void resetNamespaceStack()


Copyright © 2001 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge Logo