Package com.thoughtworks.xstream.io.xml
Class JDomWriter
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.JDomWriter
- All Implemented Interfaces:
ExtendedHierarchicalStreamWriter
,HierarchicalStreamWriter
,DocumentWriter
,XmlFriendlyWriter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJDomWriter
(org.jdom.Element container) JDomWriter
(org.jdom.Element container, NameCoder nameCoder) JDomWriter
(org.jdom.Element container, XmlFriendlyReplacer replacer) Deprecated.JDomWriter
(org.jdom.Element container, org.jdom.JDOMFactory factory) JDomWriter
(org.jdom.Element container, org.jdom.JDOMFactory factory, NameCoder nameCoder) JDomWriter
(org.jdom.Element container, org.jdom.JDOMFactory factory, XmlFriendlyReplacer replacer) Deprecated.As of 1.4 useJDomWriter(Element, JDOMFactory, NameCoder)
instead.JDomWriter
(org.jdom.JDOMFactory factory) JDomWriter
(org.jdom.JDOMFactory factory, NameCoder nameCoder) JDomWriter
(org.jdom.JDOMFactory factory, XmlFriendlyReplacer replacer) Deprecated.As of 1.4 useJDomWriter(JDOMFactory, NameCoder)
instead. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(String key, String value) protected Object
createNode
(String name) Create a node.void
Write the value (text content) of the current node.private org.jdom.Element
top()
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractDocumentWriter
close, endNode, endNodeInternally, flush, getCurrent, getTopLevelNodes, startNode
Methods inherited from class com.thoughtworks.xstream.io.xml.AbstractXmlWriter
escapeXmlName
Methods inherited from class com.thoughtworks.xstream.io.AbstractWriter
encodeAttribute, encodeNode, startNode, underlyingWriter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
underlyingWriter
-
Field Details
-
documentFactory
private final org.jdom.JDOMFactory documentFactory
-
-
Constructor Details
-
JDomWriter
- Since:
- 1.4
-
JDomWriter
public JDomWriter(org.jdom.Element container, org.jdom.JDOMFactory factory, XmlFriendlyReplacer replacer) Deprecated.As of 1.4 useJDomWriter(Element, JDOMFactory, NameCoder)
instead.- Since:
- 1.2
-
JDomWriter
public JDomWriter(org.jdom.Element container, org.jdom.JDOMFactory factory) -
JDomWriter
- Since:
- 1.4
-
JDomWriter
Deprecated.As of 1.4 useJDomWriter(JDOMFactory, NameCoder)
instead.- Since:
- 1.2.1
-
JDomWriter
public JDomWriter(org.jdom.JDOMFactory factory) -
JDomWriter
- Since:
- 1.4
-
JDomWriter
Deprecated.As of 1.4 useJDomWriter(Element, NameCoder)
instead.- Since:
- 1.2.1
-
JDomWriter
public JDomWriter(org.jdom.Element container) -
JDomWriter
public JDomWriter()
-
-
Method Details
-
createNode
Description copied from class:AbstractDocumentWriter
Create a node. The provided node name is not yet XML friendly. IfAbstractDocumentWriter.getCurrent()
returnsnull
the node is a top level node.- Specified by:
createNode
in classAbstractDocumentWriter
- Parameters:
name
- the node name- Returns:
- the new node
-
setValue
Description copied from interface:HierarchicalStreamWriter
Write the value (text content) of the current node. -
addAttribute
-
top
private org.jdom.Element top()
-
JDomWriter(Element, NameCoder)
instead.