private static final Log log = LogFactory.getLog(StaxSourceTest.class);
public void testStaxSourceOnStream() throws Exception {
InputStream is = getClass().getResourceAsStream("test.xml");
XMLStreamReader xsr = XMLInputFactory.newInstance().createXMLStreamReader(is);
StaxSource ss = new StaxSource(xsr);
StringWriter buffer = new StringWriter();
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(ss, new StreamResult(buffer));
log.info(buffer.toString());
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();