org.dom4j.io

Class DOMWriter


public class DOMWriter
extends java.lang.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(org.w3c.dom.Document domDocument, org.w3c.dom.Node domCurrent, List content)
protected void
appendDOMTree(org.w3c.dom.Document domDocument, org.w3c.dom.Node domCurrent, String text)
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 domDoc, org.w3c.dom.Node domCurrent, ProcessingInstruction pi)
protected String
attributeNameForNamespace(Namespace namespace)
protected org.w3c.dom.Document
createDomDocument(Document document)
protected org.w3c.dom.Document
createDomDocument(Document document, DOMImplementation domImpl)
protected org.w3c.dom.Document
createDomDocumentViaJAXP()
Class
getDomDocumentClass()
protected boolean
isNamespaceDeclaration(Namespace ns)
protected void
resetNamespaceStack()
void
setDomDocumentClass(Class domDocumentClass)
Sets the DOM org.w3c.dom.Documentimplementation class used by the writer when creating DOM documents.
void
setDomDocumentClassName(String name)
Sets the DOM org.w3c.dom.Documentimplementation class name used by the writer when creating DOM documents.
org.w3c.dom.Document
write(Document document)
org.w3c.dom.Document
write(Document document, DOMImplementation domImpl)
protected void
writeNamespace(org.w3c.dom.Element domElement, Namespace namespace)

Constructor Details

DOMWriter

public DOMWriter()

DOMWriter

public DOMWriter(Class domDocumentClass)

Method Details

appendDOMTree

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

appendDOMTree

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

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,
                             Element element)

appendDOMTree

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

appendDOMTree

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

attributeNameForNamespace

protected String attributeNameForNamespace(Namespace namespace)

createDomDocument

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

createDomDocument

protected org.w3c.dom.Document createDomDocument(Document document,
                                                 DOMImplementation domImpl)
            throws DocumentException

createDomDocumentViaJAXP

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

getDomDocumentClass

public Class getDomDocumentClass()
            throws DocumentException

isNamespaceDeclaration

protected boolean isNamespaceDeclaration(Namespace ns)

resetNamespaceStack

protected void resetNamespaceStack()

setDomDocumentClass

public void setDomDocumentClass(Class domDocumentClass)
Sets the DOM org.w3c.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 org.w3c.dom.Documentimplementation class name used by the writer when creating DOM documents.
Parameters:
name - is the name of the Class implementing the org.w3c.dom.Document interface
Throws:
DocumentException - if the class could not be loaded

write

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

write

public org.w3c.dom.Document write(Document document,
                                  DOMImplementation domImpl)
            throws DocumentException

writeNamespace

protected void writeNamespace(org.w3c.dom.Element domElement,
                              Namespace namespace)

Copyright B) 2005 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge Logo