com.thoughtworks.xstream.io.xml
Class JDomWriter

java.lang.Object
  extended by com.thoughtworks.xstream.io.xml.AbstractXmlWriter
      extended by com.thoughtworks.xstream.io.xml.AbstractDocumentWriter
          extended by com.thoughtworks.xstream.io.xml.JDomWriter
All Implemented Interfaces:
ExtendedHierarchicalStreamWriter, HierarchicalStreamWriter, DocumentWriter, XmlFriendlyWriter

public class JDomWriter
extends AbstractDocumentWriter

Author:
Laurent Bihanic

Constructor Summary
JDomWriter()
           
JDomWriter(org.jdom.Element container)
           
JDomWriter(org.jdom.Element container, org.jdom.JDOMFactory factory)
           
JDomWriter(org.jdom.Element container, org.jdom.JDOMFactory factory, XmlFriendlyReplacer replacer)
           
JDomWriter(org.jdom.Element container, XmlFriendlyReplacer replacer)
           
JDomWriter(org.jdom.JDOMFactory factory)
           
JDomWriter(org.jdom.JDOMFactory factory, XmlFriendlyReplacer replacer)
           
 
Method Summary
 void addAttribute(java.lang.String key, java.lang.String value)
           
protected  java.lang.Object createNode(java.lang.String name)
          Create a node.
 java.util.List getResult()
          Deprecated. since 1.2.1, use AbstractDocumentWriter.getTopLevelNodes() instead
 void setValue(java.lang.String text)
          Write the value (text content) of the current node.
 
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, 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
 

Constructor Detail

JDomWriter

public JDomWriter(org.jdom.Element container,
                  org.jdom.JDOMFactory factory,
                  XmlFriendlyReplacer replacer)
Since:
1.2

JDomWriter

public JDomWriter(org.jdom.Element container,
                  org.jdom.JDOMFactory factory)

JDomWriter

public JDomWriter(org.jdom.JDOMFactory factory,
                  XmlFriendlyReplacer replacer)
Since:
1.2.1

JDomWriter

public JDomWriter(org.jdom.JDOMFactory factory)

JDomWriter

public JDomWriter(org.jdom.Element container,
                  XmlFriendlyReplacer replacer)
Since:
1.2.1

JDomWriter

public JDomWriter(org.jdom.Element container)

JDomWriter

public JDomWriter()
Method Detail

createNode

protected java.lang.Object createNode(java.lang.String name)
Description copied from class: AbstractDocumentWriter
Create a node. The provided node name is not yet XML friendly. If AbstractDocumentWriter.getCurrent() returns null the node is a top level node.

Specified by:
createNode in class AbstractDocumentWriter
Parameters:
name - the node name
Returns:
the new node

setValue

public void setValue(java.lang.String text)
Description copied from interface: HierarchicalStreamWriter
Write the value (text content) of the current node.


addAttribute

public void addAttribute(java.lang.String key,
                         java.lang.String value)

getResult

public java.util.List getResult()
Deprecated. since 1.2.1, use AbstractDocumentWriter.getTopLevelNodes() instead



Joe Walnes, http://xstream.codehaus.org/