/** * Parses an instance documented defined by a sax input source. * <p> * The object returned from the parse is the object which has been bound to the root * element of the document. This method should only be called once for a single instance document. * </p> * * @return The object representation of the root element of the document. * * @throws IOException * @throws SAXException * @throws ParserConfigurationException */ public Object parse(InputSource source) throws IOException, SAXException, ParserConfigurationException { parser = parser(); parser.setContentHandler(handler); parser.setErrorHandler(handler); parser.parse(source); return handler.getValue(); }
/** * Parses an instance documented defined by a sax input source. * <p> * The object returned from the parse is the object which has been bound to the root * element of the document. This method should only be called once for a single instance document. * </p> * * @return The object representation of the root element of the document. * * @throws IOException * @throws SAXException * @throws ParserConfigurationException */ public Object parse(InputSource source) throws IOException, SAXException, ParserConfigurationException { parser = parser(); parser.setContentHandler( handler ); parser.setErrorHandler( handler ); parser.parse( source ); return handler.getValue(); }
/** * Parses an instance documented defined by a sax input source. * <p> * The object returned from the parse is the object which has been bound to the root * element of the document. This method should only be called once for a single instance document. * </p> * * @return The object representation of the root element of the document. * * @throws IOException * @throws SAXException * @throws ParserConfigurationException */ public Object parse(InputSource source) throws IOException, SAXException, ParserConfigurationException { parser = parser(); parser.setContentHandler(handler); parser.setErrorHandler(handler); parser.parse(source); return handler.getValue(); }