Package com.thoughtworks.xstream.io.xml
Interface DocumentWriter
-
- All Superinterfaces:
HierarchicalStreamWriter
- All Known Implementing Classes:
AbstractDocumentWriter
,DomWriter
,XppDomWriter
public interface DocumentWriter extends HierarchicalStreamWriter
A generic interface for allHierarchicalStreamWriter
implementations generating a DOM.- Since:
- 1.2.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List
getTopLevelNodes()
Retrieve aList
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 aList
with 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 implementingHierarchicalStreamWriter
was called multiple times with an empty node stack. Such a situation occurs callingXStream.marshal(Object, HierarchicalStreamWriter)
multiple times directly.- Returns:
- a
List
with top nodes - Since:
- 1.2.1
-
-