public static void parse (DefaultHandler handler, InputStream in)
        throws IOException, ParserConfigurationException, SAXException
    {
        XMLReader xr = _pfactory.newSAXParser().getXMLReader();

        xr.setContentHandler(handler);
        xr.setErrorHandler(handler);

        xr.parse(new InputSource(in));
    }
public static void parse ( DefaultHandler handler , InputStream in ) throws IOException , ParserConfigurationException , SAXException { XMLReader xr = _pfactory . newSAXParser ( ) . getXMLReader ( ) ; xr . setContentHandler ( handler ) ; xr . setErrorHandler ( handler ) ; xr . parse ( new InputSource ( in ) ) ; }
Parse the XML data in the given input stream, using the
specified handler object as both the content and error handler.

@param handler the SAX event handler
@param in the input stream containing the XML to be parsed