java.lang.Object | ||
↳ | com.thoughtworks.xstream.io.xml.AbstractXmlWriter | |
↳ | com.thoughtworks.xstream.io.xml.AbstractDocumentWriter |
![]() |
A generic HierarchicalStreamWriter
for DOM writer
implementations. The implementation manages a list of top level DOM nodes. Every time the
last node is closed on the node stack, the next started node is added to the list. This list
can be retrieved using the getTopLevelNodes()
method.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an AbstractDocumentWriter.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Close the writer, if necessary.
| |||||||||||
Called when a node ends.
| |||||||||||
Flush the writer, if necessary.
| |||||||||||
Retrieve a
List with the top elements. | |||||||||||
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a node.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs an AbstractDocumentWriter.
container | the top level container for the nodes to create (may be
null ) |
---|---|
replacer | the object that creates XML-friendly names |
Close the writer, if necessary.
Called when a node ends. Hook for derived implementations.
Flush the writer, if necessary.
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
startNode(String)
of the implementing
HierarchicalStreamWriter
was called multiple times with an empty node stack. Such
a situation occurs calling
marshal(Object, HierarchicalStreamWriter)
multiple times directly.
List
with top nodesCreate a node. The provided node name is not yet XML friendly. If getCurrent()
returns null
the node is a top level node.
name | the node name |
---|