/** * {@inheritDoc} * <p> * Method is same as {@link SaxEventRecorder#recordEvents(InputSource)} except that it calls the * {@link #getSaxParser()} method for creating the parser. */ @Override public List<SaxEvent> recordEvents(InputSource inputSource) throws JoranException { SAXParser saxParser = getSaxParser(); try { saxParser.parse(inputSource, this); return saxEventList; } catch (IOException ie) { handleError("I/O error occurred while parsing xml file", ie); } catch (SAXException se) { // Exception added into StatusManager via Sax error handling. No need to add it again throw new JoranException("Problem parsing XML document. See previously reported errors.", se); } catch (Exception ex) { handleError("Unexpected exception while parsing XML document.", ex); } throw new IllegalStateException("This point can never be reached"); }