Code example for SAXParseException

0
            al.add(new SAXParseException(ioe.getLocalizedMessage(), null));
 
            return al;
        } catch (SAXException e) {
            ArrayList<SAXParseException> al = new ArrayList<SAXParseException>();
            al.add(new SAXParseException(e.getLocalizedMessage(), null));
 
            return al;
        } catch (ParserConfigurationException e) {
            ArrayList<SAXParseException> al = new ArrayList<SAXParseException>();
            al.add(new SAXParseException(e.getLocalizedMessage(), null));
            return al;
		} 
    } 
 
    // errors in the document will be put in "errors". 
    // if errors.size() ==0  then there were no errors. 
    private class Validator extends DefaultHandler {
        public ArrayList<SAXParseException> errors = new ArrayList<SAXParseException>();
 
        @Override