try {  SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); XMLReader saxparser = factory.newSAXParser().getXMLReader();   saxparser.setContentHandler(builder); saxparser.parse(new InputSource(in)); } catch (SAXException e) { e.printStackTrace(); } catch (IOException ioe) { ioe.printStackTrace(); }catch(ParserConfigurationException e){ e.printStackTrace(); }
try {
    public static ProcessorManager buildFromStream(InputStream in) {        SAXProcessorBuilder builder = new SAXProcessorBuilder();        try {        	        	SAXParserFactory factory = SAXParserFactory.newInstance();        	factory.setNamespaceAware(true);        	XMLReader saxparser = factory.newSAXParser().getXMLReader();        	                    saxparser.setContentHandler(builder);            saxparser.parse(new InputSource(in));        } catch (SAXException e) {            e.printStackTrace();        } catch (IOException ioe) {        	ioe.printStackTrace();        }catch(ParserConfigurationException e){        	 e.printStackTrace();        }        return builder.getManager();    }