/** * Description of the Method * * @param in Description of the Parameter * @return Description of the Return Value * @exception Exception Description of the Exception */ public synchronized E parseXML(Reader in) throws Exception { XMLParserHandler<E> handler = new XMLParserHandler<>(); XMLProcessor proc = new XMLProcessor(); proc.setHandler(handler); proc.parse(null, null, in); return handler.getObject(); }
/** * Description of the Method * * @param in Description of the Parameter * @return Description of the Return Value * @exception Exception Description of the Exception */ public synchronized E parseXML(InputStream in) throws Exception { if (DEBUG) { System.out.println("XMLCParser: parsing from stream"); } XMLParserHandler<E> handler = new XMLParserHandler<>(); XMLProcessor proc = new XMLProcessor(); proc.setHandler(handler); proc.parse(null, null, in, null); return handler.getObject(); }