org.dom4j.io
Class DOMWriter

java.lang.Object
  |
  +--org.dom4j.io.DOMWriter

public class DOMWriter
extends Object

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

Version:
$Revision: 1.7 $
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 domDocument, 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 domImplementation)
           
protected  Document createDomDocumentViaJAXP()
           
 Class getDomDocumentClass()
           
protected  boolean isNamespaceDeclaration(Namespace ns)
           
protected  void resetNamespaceStack()
           
 void setDomDocumentClass(Class domDocumentClass)
          Sets the DOM Document implementation class used by the writer when creating DOM documents.
 void setDomDocumentClassName(String className)
          Sets the DOM Document implementation class name used by the writer when creating DOM documents.
 Document write(Document document)
           
 Document write(Document document, DOMImplementation domImplementation)
           
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
DocumentException

setDomDocumentClass

public void setDomDocumentClass(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(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 Document write(Document document)
               throws DocumentException
DocumentException

write

public Document write(Document document,
                      DOMImplementation domImplementation)
               throws DocumentException
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 domDocument,
                             Node domCurrent,
                             ProcessingInstruction pi)

writeNamespace

protected void writeNamespace(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 String attributeNameForNamespace(Namespace namespace)

createDomDocument

protected Document createDomDocument(Document document)
                              throws DocumentException
DocumentException

createDomDocumentViaJAXP

protected Document createDomDocumentViaJAXP()
                                     throws DocumentException
DocumentException

createDomDocument

protected Document createDomDocument(Document document,
                                     DOMImplementation domImplementation)
                              throws DocumentException
DocumentException

isNamespaceDeclaration

protected boolean isNamespaceDeclaration(Namespace ns)

resetNamespaceStack

protected void resetNamespaceStack()


Copyright © 2002-2003 MetaStuff Ltd.. All Rights Reserved.