public Document parse(InputStream input) throws IOException
{
try
{
BadgerFishXMLInputFactory inputFactory = new BadgerFishXMLInputFactory();
XMLStreamReader streamReader = inputFactory.createXMLStreamReader(input);
XMLInputFactory readerFactory = XMLInputFactory.newInstance();
XMLEventReader eventReader = readerFactory.createXMLEventReader(streamReader);
// Can not create a STaX writer for a DOMResult in woodstox-3.1.1
// DOMResult result = new DOMResult();