XMLStreamReader xsr = sinfactory.createXMLStreamReader(new StringReader(expect));
assertTrue(xsr.getEventType() == XMLStreamConstants.START_DOCUMENT);
assertTrue(xsr.hasNext());
xsr.next();
Element backagain = (Element)sbuilder.fragment(xsr);
// convert the input to a SAX Stream
sw.getBuffer().setLength(0);
xsw = soutfactory.createXMLStreamWriter(sw);