Package org.dom4j.io
Class DOMWriter
java.lang.Object
org.dom4j.io.DOMWriter
DOMWriter
takes a DOM4J tree and outputs it as a W3C DOM
object- Version:
- $Revision: 1.17 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]
private Class<?>
private static boolean
private NamespaceStack
stack ofNamespace
objects -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendDOMTree
(Document domDocument, Node domCurrent, String text) protected void
appendDOMTree
(Document domDocument, Node domCurrent, List<Node> content) 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 domDoc, Node domCurrent, ProcessingInstruction pi) protected String
attributeNameForNamespace
(Namespace namespace) protected Document
createDomDocument
(Document document) protected Document
createDomDocument
(Document document, DOMImplementation domImpl) protected Document
Class<?>
protected boolean
protected void
void
setDomDocumentClass
(Class<?> domDocumentClass) Sets the DOMDocument
implementation class used by the writer when creating DOM documents.void
Sets the DOMDocument
implementation class name used by the writer when creating DOM documents.write
(Document document, DOMImplementation domImpl) protected void
writeNamespace
(Element domElement, Namespace namespace)
-
Field Details
-
loggedWarning
private static boolean loggedWarning -
DEFAULT_DOM_DOCUMENT_CLASSES
-
domDocumentClass
-
namespaceStack
stack ofNamespace
objects
-
-
Constructor Details
-
DOMWriter
public DOMWriter() -
DOMWriter
-
-
Method Details
-
getDomDocumentClass
- Throws:
DocumentException
-
setDomDocumentClass
Sets the DOMDocument
implementation class used by the writer when creating DOM documents.- Parameters:
domDocumentClass
- is the Class implementing theDocument
interface
-
setDomDocumentClassName
Sets the DOMDocument
implementation class name used by the writer when creating DOM documents.- Parameters:
name
- is the name of the Class implementing theDocument
interface- Throws:
DocumentException
- if the class could not be loaded
-
write
- Throws:
DocumentException
-
write
- Throws:
DocumentException
-
appendDOMTree
-
appendDOMTree
-
appendDOMTree
-
appendDOMTree
-
appendDOMTree
-
appendDOMTree
-
appendDOMTree
-
writeNamespace
-
attributeNameForNamespace
-
createDomDocument
- Throws:
DocumentException
-
createDomDocumentViaJAXP
- Throws:
DocumentException
-
createDomDocument
protected Document createDomDocument(Document document, DOMImplementation domImpl) throws DocumentException - Throws:
DocumentException
-
isNamespaceDeclaration
-
resetNamespaceStack
protected void resetNamespaceStack()
-