Class Dom4JWriter
java.lang.Object
com.thoughtworks.xstream.io.AbstractWriter
com.thoughtworks.xstream.io.xml.AbstractXmlWriter
com.thoughtworks.xstream.io.xml.AbstractDocumentWriter
com.thoughtworks.xstream.io.xml.Dom4JWriter
- All Implemented Interfaces:
ExtendedHierarchicalStreamWriter, HierarchicalStreamWriter, DocumentWriter, XmlFriendlyWriter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDom4JWriter(org.dom4j.Branch root) Dom4JWriter(org.dom4j.Branch root, NameCoder nameCoder) Dom4JWriter(org.dom4j.Branch root, XmlFriendlyReplacer replacer) Deprecated.Dom4JWriter(org.dom4j.Branch root, org.dom4j.DocumentFactory factory, NameCoder nameCoder) Dom4JWriter(org.dom4j.Branch root, org.dom4j.DocumentFactory factory, XmlFriendlyReplacer replacer) Deprecated.As of 1.4 useDom4JWriter(Branch, DocumentFactory, NameCoder)instead.Dom4JWriter(org.dom4j.DocumentFactory documentFactory) Dom4JWriter(org.dom4j.DocumentFactory factory, NameCoder nameCoder) Dom4JWriter(org.dom4j.DocumentFactory factory, XmlFriendlyReplacer replacer) Deprecated.As of 1.4 useDom4JWriter(DocumentFactory, NameCoder)instead. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(String key, String value) protected ObjectcreateNode(String name) Create a node.voidWrite the value (text content) of the current node.private org.dom4j.Branchtop()Methods inherited from class AbstractDocumentWriter
close, endNode, endNodeInternally, flush, getCurrent, getTopLevelNodes, startNodeMethods inherited from class AbstractXmlWriter
escapeXmlNameMethods inherited from class AbstractWriter
encodeAttribute, encodeNode, startNode, underlyingWriterMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HierarchicalStreamWriter
underlyingWriter
-
Field Details
-
documentFactory
private final org.dom4j.DocumentFactory documentFactory
-
-
Constructor Details
-
Dom4JWriter
- Since:
- 1.4
-
Dom4JWriter
- Since:
- 1.4
-
Dom4JWriter
- Since:
- 1.4
-
Dom4JWriter
public Dom4JWriter(org.dom4j.Branch root, org.dom4j.DocumentFactory factory, XmlFriendlyReplacer replacer) Deprecated.As of 1.4 useDom4JWriter(Branch, DocumentFactory, NameCoder)instead.- Since:
- 1.2.1
-
Dom4JWriter
Deprecated.As of 1.4 useDom4JWriter(DocumentFactory, NameCoder)instead.- Since:
- 1.2.1
-
Dom4JWriter
public Dom4JWriter(org.dom4j.DocumentFactory documentFactory) - Since:
- 1.2.1
-
Dom4JWriter
Deprecated.As of 1.4 useDom4JWriter(Branch, NameCoder)instead- Since:
- 1.2.1
-
Dom4JWriter
public Dom4JWriter(org.dom4j.Branch root) -
Dom4JWriter
public Dom4JWriter()- Since:
- 1.2.1
-
-
Method Details
-
createNode
Description copied from class:AbstractDocumentWriterCreate a node. The provided node name is not yet XML friendly. IfAbstractDocumentWriter.getCurrent()returnsnullthe node is a top level node.- Specified by:
createNodein classAbstractDocumentWriter- Parameters:
name- the node name- Returns:
- the new node
-
setValue
Description copied from interface:HierarchicalStreamWriterWrite the value (text content) of the current node. -
addAttribute
-
top
private org.dom4j.Branch top()
-
Dom4JWriter(Branch, NameCoder)instead