Top Fields Constructors Methods
com.thoughtworks.xstream.io.xml

public Class DomWriter

extends AbstractDocumentWriter
Class Inheritance
Imports
com.thoughtworks.xstream.io.naming.NameCoder, org.w3c.dom.Document, .Element

Deprecated

as a consequence of AbstractDocumentWriter being deprecated. See corresponding docs for further information.

Author
Michael Kopp

Field Summary

Modifier and TypeField and Description
private final Document
private boolean

Constructor Summary

AccessConstructor and Description
public
DomWriter(final Document document)

public
DomWriter(final Element rootElement)

public
DomWriter(final Document document, final NameCoder nameCoder)

public
DomWriter(final Element element, final Document document, final NameCoder nameCoder)

public
DomWriter(final Element rootElement, final NameCoder nameCoder)

public
DomWriter(final Document document, final XmlFriendlyReplacer replacer)

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

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

Deprecated As of 1.4 use DomWriter#DomWriter(Element, NameCoder) instead.

Method Summary

Modifier and TypeMethod and Description
public void
protected Object
createNode(final String
the node name
name
)

Implements abstract com.thoughtworks.xstream.io.xml.AbstractDocumentWriter.createNode.

Create a node.
public void
setValue(final String text)

Implements com.thoughtworks.xstream.io.HierarchicalStreamWriter.setValue.

Write the value (text content) of the current node.
private Element
top()

Inherited from com.thoughtworks.xstream.io.xml.AbstractDocumentWriter:
closeendNodeendNodeInternallyflushgetCurrentgetTopLevelNodesstartNode

Field Detail

documentback to summary
private final Document document
hasRootElementback to summary
private boolean hasRootElement

Constructor Detail

DomWriterback to summary
public DomWriter(final Document document)
DomWriterback to summary
public DomWriter(final Element rootElement)
DomWriterback to summary
public DomWriter(final Document document, final NameCoder nameCoder)
Since
1.4
DomWriterback to summary
public DomWriter(final Element element, final Document document, final NameCoder nameCoder)
Since
1.4
DomWriterback to summary
public DomWriter(final Element rootElement, final NameCoder nameCoder)
Since
1.4
DomWriterback to summary
public DomWriter(final Document document, final XmlFriendlyReplacer replacer)

Deprecated

As of 1.4 use DomWriter#DomWriter(Document, NameCoder) instead.

Since
1.2
DomWriterback to summary
public DomWriter(final Element element, final Document document, final XmlFriendlyReplacer replacer)

Deprecated

As of 1.4 use DomWriter#DomWriter(Element, Document, NameCoder) instead.

Since
1.2.1
DomWriterback to summary
public DomWriter(final Element rootElement, final XmlFriendlyReplacer replacer)

Deprecated

As of 1.4 use DomWriter#DomWriter(Element, NameCoder) instead.

Since
1.2

Method Detail

addAttributeback to summary
public void addAttribute(final String name, final String value)

Implements com.thoughtworks.xstream.io.HierarchicalStreamWriter.addAttribute.

createNodeback to summary
protected Object createNode(final String name)

Implements abstract com.thoughtworks.xstream.io.xml.AbstractDocumentWriter.createNode.

Doc from com.thoughtworks.xstream.io.xml.AbstractDocumentWriter.createNode.

Create a node. The provided node name is not yet XML friendly. If getCurrent() returns null the node is a top level node.

Parameters
name:String

the node name

Returns:Object

the new node

setValueback to summary
public void setValue(final String text)

Implements com.thoughtworks.xstream.io.HierarchicalStreamWriter.setValue.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamWriter.setValue.

Write the value (text content) of the current node.

topback to summary
private Element top()