nd = nd.getNextSibling();
}
Source source = new DOMSource(nd);
message.setContent(Source.class, source);
message.setContent(XMLStreamReader.class,
new W3CDOMStreamReader(domWriter.getCurrentFragment()));
} else if (domWriter.getDocument().getDocumentElement() != null) {
Source source = new DOMSource(domWriter.getDocument());
message.setContent(Source.class, source);
message.setContent(XMLStreamReader.class,
StaxUtils.createXMLStreamReader(domWriter.getDocument()));