use of com.thoughtworks.xstream.io.xml.DomWriter in project spring-framework by spring-projects.
the class XStreamMarshaller method marshalDomNode.
// Marshalling
@Override
protected void marshalDomNode(Object graph, Node node) throws XmlMappingException {
HierarchicalStreamWriter streamWriter;
if (node instanceof Document) {
streamWriter = new DomWriter((Document) node, this.nameCoder);
} else if (node instanceof Element) {
streamWriter = new DomWriter((Element) node, node.getOwnerDocument(), this.nameCoder);
} else {
throw new IllegalArgumentException("DOMResult contains neither Document nor Element");
}
doMarshal(graph, streamWriter, null);
}
Aggregations