Code example for SAXException

0
 
        try { 
            return validateGETMAP(xml, DataUtilities.fileToURL(schemaFile));
        } catch (Exception e) {
            ArrayList al = new ArrayList();
            al.add(new SAXException(e));
 
            return al;
        } 
    } 
 
    public static String getErrorMessage(InputStream xml, List errors) {
        return getErrorMessage(new InputStreamReader(xml), errors);
    } 
 
    /** 
       *  returns a better formated error message - suitable for framing. 
       * There's a more complex version in StylesEditorAction. 
       * 
       * This will kick out a VERY LARGE errorMessage.