Top Description Methods
com.thoughtworks.xstream.io.xml

public Interface DocumentWriter

extends HierarchicalStreamWriter
Known Direct Implementers
com.thoughtworks.xstream.io.xml.AbstractDocumentWriter
Imports
java.util.List, com.thoughtworks.xstream.io.HierarchicalStreamWriter

A generic interface for all HierarchicalStreamWriter implementations generating a DOM.
Author
Jörg Schaible
Since
1.2.1

Method Summary

Modifier and TypeMethod and Description
public List<E>

Returns:

a List with top nodes
getTopLevelNodes
()

Retrieve a List with the top elements.

Inherited from com.thoughtworks.xstream.io.HierarchicalStreamWriter:
addAttributecloseendNodeflushsetValuestartNodeunderlyingWriter

Method Detail

getTopLevelNodesback to summary
public List<E> getTopLevelNodes()

Retrieve a List with the top elements. In the standard use case this list will only contain a single element. Additional elements can only occur, if HierarchicalStreamWriter#startNode(String) of the implementing HierarchicalStreamWriter was called multiple times with an empty node stack. Such a situation occurs calling com.thoughtworks.xstream.XStream#marshal(Object, HierarchicalStreamWriter) multiple times directly.

Returns:List<E>

a List with top nodes

Since
1.2.1