com.thoughtworks.xstream.io.xml
Class DomWriter

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

public class DomWriter
extends AbstractDocumentWriter

Author:
Michael Kopp

Constructor Summary
DomWriter(Document document)
           
DomWriter(Document document, NameCoder nameCoder)
           
DomWriter(Document document, XmlFriendlyReplacer replacer)
          Deprecated. As of 1.4 use DomWriter(Document, NameCoder) instead.
DomWriter(Element rootElement)
           
DomWriter(Element element, Document document, NameCoder nameCoder)
           
DomWriter(Element element, Document document, XmlFriendlyReplacer replacer)
          Deprecated. As of 1.4 use DomWriter(Element, Document, NameCoder) instead.
DomWriter(Element rootElement, NameCoder nameCoder)
           
DomWriter(Element rootElement, XmlFriendlyReplacer replacer)
          Deprecated. As of 1.4 use DomWriter(Element, NameCoder) instead.
 
Method Summary
 void addAttribute(String name, String value)
           
protected  Object createNode(String name)
          Create a node.
 void setValue(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
 
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
 

Constructor Detail

DomWriter

public DomWriter(Document document)

DomWriter

public DomWriter(Element rootElement)

DomWriter

public DomWriter(Document document,
                 NameCoder nameCoder)
Since:
1.4

DomWriter

public DomWriter(Element element,
                 Document document,
                 NameCoder nameCoder)
Since:
1.4

DomWriter

public DomWriter(Element rootElement,
                 NameCoder nameCoder)
Since:
1.4

DomWriter

public DomWriter(Document document,
                 XmlFriendlyReplacer replacer)
Deprecated. As of 1.4 use DomWriter(Document, NameCoder) instead.

Since:
1.2

DomWriter

public DomWriter(Element element,
                 Document document,
                 XmlFriendlyReplacer replacer)
Deprecated. As of 1.4 use DomWriter(Element, Document, NameCoder) instead.

Since:
1.2.1

DomWriter

public DomWriter(Element rootElement,
                 XmlFriendlyReplacer replacer)
Deprecated. As of 1.4 use DomWriter(Element, NameCoder) instead.

Since:
1.2
Method Detail

createNode

protected Object createNode(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

addAttribute

public void addAttribute(String name,
                         String value)

setValue

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



Copyright © 2004-2014 XStream. All Rights Reserved.