com.thoughtworks.xstream.io.xml
Interface DocumentWriter

All Superinterfaces:
HierarchicalStreamWriter
All Known Implementing Classes:
AbstractDocumentWriter, Dom4JWriter, DomWriter, JDomWriter, XomWriter, XppDomWriter

public interface DocumentWriter
extends HierarchicalStreamWriter

A generic interface for all HierarchicalStreamWriter implementations generating a DOM.

Since:
1.2.1
Author:
Jörg Schaible

Method Summary
 java.util.List getTopLevelNodes()
          Retrieve a List with the top elements.
 
Methods inherited from interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
addAttribute, close, endNode, flush, setValue, startNode, underlyingWriter
 

Method Detail

getTopLevelNodes

java.util.List 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 XStream.marshal(Object, HierarchicalStreamWriter) multiple times directly.

Returns:
a List with top nodes
Since:
1.2.1


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