Package com.thoughtworks.xstream.io.xml
Interface DocumentWriter
- All Superinterfaces:
HierarchicalStreamWriter
- All Known Implementing Classes:
AbstractDocumentWriter
,Dom4JWriter
,DomWriter
,JDom2Writer
,JDomWriter
,XppDomWriter
A generic interface for all
HierarchicalStreamWriter
implementations generating a
DOM.- Since:
- 1.2.1
-
Method Summary
Methods inherited from interface com.thoughtworks.xstream.io.HierarchicalStreamWriter
addAttribute, close, endNode, flush, setValue, startNode, underlyingWriter
-
Method Details
-
getTopLevelNodes
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
-