Package com.google.buzz.parser.handler

Examples of com.google.buzz.parser.handler.CommentHandler


     * @throws BuzzParsingException if a parsing error occurs.
     */
    public static BuzzComment parseComment( String xmlResponse )
        throws BuzzParsingException, BuzzIOException
    {
        CommentHandler handler;
        XMLReader xr;
        try
        {
            xr = XMLReaderFactory.createXMLReader();
            handler = new CommentHandler( xr );
            xr.setContentHandler( handler );
            xr.setErrorHandler( handler );
            xr.parse( new InputSource( new ByteArrayInputStream( xmlResponse.getBytes( "UTF-8" ) ) ) );
        }
        catch ( SAXException e )
        {
            throw new BuzzParsingException( e );
        }
        catch ( IOException e )
        {
            throw new BuzzIOException( e );
        }
        return handler.getBuzzComment();
    }
View Full Code Here

TOP

Related Classes of com.google.buzz.parser.handler.CommentHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.