org.dom4j.io
Class DOMWriter

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

public class DOMWriter
extends Object

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

Version:
$Revision: 1.17 $
Author:
James Strachan

Constructor Summary
DOMWriter()
           
DOMWriter(Class domDocumentClass)
           
 
Method Summary
protected  void appendDOMTree(Document domDocument, Node domCurrent, CDATA cdata)
           
protected  void appendDOMTree(Document domDocument, Node domCurrent, Comment comment)
           
protected  void appendDOMTree(Document domDocument, Node domCurrent, Element element)
           
protected  void appendDOMTree(Document domDocument, Node domCurrent, Entity entity)
           
protected  void appendDOMTree(Document domDocument, Node domCurrent, List content)
           
protected  void appendDOMTree(Document domDoc, Node domCurrent, ProcessingInstruction pi)
           
protected  void appendDOMTree(Document domDocument, Node domCurrent, String text)
           
protected  String attributeNameForNamespace(Namespace namespace)
           
protected  Document createDomDocument(Document document)
           
protected  Document createDomDocument(Document document, DOMImplementation domImpl)
           
protected  Document createDomDocumentViaJAXP()
           
 Class getDomDocumentClass()
           
protected  boolean isNamespaceDeclaration(Namespace ns)
           
protected  void resetNamespaceStack()
           
 void setDomDocumentClass(Class domDocumentClass)
          Sets the DOM Documentimplementation class used by the writer when creating DOM documents.
 void setDomDocumentClassName(String name)
          Sets the DOM Documentimplementation class name used by the writer when creating DOM documents.
 Document write(Document document)
           
 Document write(Document document, DOMImplementation domImpl)
           
protected  void writeNamespace(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(Class domDocumentClass)
Method Detail

getDomDocumentClass

public Class getDomDocumentClass()
                          throws DocumentException
Throws:
DocumentException

setDomDocumentClass

public void setDomDocumentClass(Class domDocumentClass)
Sets the DOM Documentimplementation class used by the writer when creating DOM documents.

Parameters:
domDocumentClass - is the Class implementing the interface

setDomDocumentClassName

public void setDomDocumentClassName(String name)
                             throws DocumentException
Sets the DOM Documentimplementation class name used by the writer when creating DOM documents.

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

write

public Document write(Document document)
               throws DocumentException
Throws:
DocumentException

write

public Document write(Document document,
                      DOMImplementation domImpl)
               throws DocumentException
Throws:
DocumentException

appendDOMTree

protected void appendDOMTree(Document domDocument,
                             Node domCurrent,
                             List content)

appendDOMTree

protected void appendDOMTree(Document domDocument,
                             Node domCurrent,
                             Element element)

appendDOMTree

protected void appendDOMTree(Document domDocument,
                             Node domCurrent,
                             CDATA cdata)

appendDOMTree

protected void appendDOMTree(Document domDocument,
                             Node domCurrent,
                             Comment comment)

appendDOMTree

protected void appendDOMTree(Document domDocument,
                             Node domCurrent,
                             String text)

appendDOMTree

protected void appendDOMTree(Document domDocument,
                             Node domCurrent,
                             Entity entity)

appendDOMTree

protected void appendDOMTree(Document domDoc,
                             Node domCurrent,
                             ProcessingInstruction pi)

writeNamespace

protected void writeNamespace(Element domElement,
                              Namespace namespace)

attributeNameForNamespace

protected String attributeNameForNamespace(Namespace namespace)

createDomDocument

protected Document createDomDocument(Document document)
                              throws DocumentException
Throws:
DocumentException

createDomDocumentViaJAXP

protected Document createDomDocumentViaJAXP()
                                     throws DocumentException
Throws:
DocumentException

createDomDocument

protected Document createDomDocument(Document document,
                                     DOMImplementation domImpl)
                              throws DocumentException
Throws:
DocumentException

isNamespaceDeclaration

protected boolean isNamespaceDeclaration(Namespace ns)

resetNamespaceStack

protected void resetNamespaceStack()


Copyright © 2001-2005 MetaStuff Ltd.. All Rights Reserved.