Deprecated
as a consequence of AbstractXmlWriter being deprecated. See corresponding docs for further information.
com.thoughtworks.xstream.io.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 DocumentWriter#getTopLevelNodes() method.
| Access | Constructor and Description |
|---|---|
| public | AbstractDocumentWriter(final Object
the top level container for the nodes to create (may be
container, final NameCoder null)the object that creates XML-friendly names nameCoder)Constructs an AbstractDocumentWriter. |
| public | AbstractDocumentWriter(final Object
the top level container for the nodes to create (may be
container, final XmlFriendlyReplacer null)the object that creates XML-friendly names replacer)
Deprecated
As of 1.4 use
Constructs an AbstractDocumentWriter.
AbstractDocumentWriter#AbstractDocumentWriter(Object, NameCoder)
instead.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements com. |
| protected abstract Object | |
| public final void | |
| public void | |
| public void | flush()
Implements com. |
| protected final Object | |
| public List | getTopLevelNodes()
Implements com. List with the top elements.
|
| public final void | startNode(final String name)
Implements com. |
| nodeStack | back to summary |
|---|---|
| private final FastStack nodeStack | |
| result | back to summary |
|---|---|
| private final List<E> result | |
| AbstractDocumentWriter | back to summary |
|---|---|
| public AbstractDocumentWriter(final Object container, final NameCoder nameCoder) Constructs an AbstractDocumentWriter. | |
| AbstractDocumentWriter | back to summary |
|---|---|
| public AbstractDocumentWriter(final Object container, final XmlFriendlyReplacer replacer)
Deprecated As of 1.4 use
Constructs an AbstractDocumentWriter.
| |
| close | back to summary |
|---|---|
| public void close() Implements com. Doc from com. Close the writer, if necessary. | |
| createNode | back to summary |
|---|---|
| protected abstract Object createNode(String name) Create a node. The provided node name is not yet XML friendly. If | |
| endNode | back to summary |
|---|---|
| public final void endNode() Implements com. | |
| endNodeInternally | back to summary |
|---|---|
| public void endNodeInternally() Called when a node ends. Hook for derived implementations.
| |
| flush | back to summary |
|---|---|
| public void flush() Implements com. Doc from com. Flush the writer, if necessary. | |
| getCurrent | back to summary |
|---|---|
protected final Object getCurrent()
| |
| getTopLevelNodes | back to summary |
|---|---|
| public List Implements com. Doc from com. Retrieve a | |
| startNode | back to summary |
|---|---|
| public final void startNode(final String name) Implements com. | |