Package com.thoughtworks.xstream.io.xml
Interface DocumentWriter
-
- All Superinterfaces:
HierarchicalStreamWriter
- All Known Implementing Classes:
AbstractDocumentWriter,Dom4JWriter,DomWriter,JDom2Writer,JDomWriter,XomWriter,XppDomWriter
public interface DocumentWriter extends HierarchicalStreamWriter
A generic interface for allHierarchicalStreamWriterimplementations generating a DOM.- Since:
- 1.2.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.ListgetTopLevelNodes()Retrieve aListwith 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 aListwith the top elements. In the standard use case this list will only contain a single element. Additional elements can only occur, ifHierarchicalStreamWriter.startNode(String)of the implementingHierarchicalStreamWriterwas called multiple times with an empty node stack. Such a situation occurs callingXStream.marshal(Object, HierarchicalStreamWriter)multiple times directly.- Returns:
- a
Listwith top nodes - Since:
- 1.2.1
-
-