public HashMap getAttribs() { AttribsHandler handler = new AttribsHandler(); SAXParserFactory factory = SAXParserFactory.newInstance(); try { SAXParser saxParser = factory.newSAXParser(); saxParser.parse( new File(RequestUtil.PATH_FEIDEATTRIBS), handler); } catch (Throwable t) { t.printStackTrace();
public synchronized HashMap getAttribs() { if (feideattribs_stored == null) { Properties config = getConfig(); if (config != null) { AttribsHandler handler = new AttribsHandler(); SAXParserFactory factory = SAXParserFactory.newInstance(); try { String filename = (String) config.get(RequestUtil.PROP_INFORMATION_FEIDEATTRIBS_XML); SAXParser saxParser = factory.newSAXParser(); saxParser.parse( new File(filename), handler); } catch (Throwable t) { log.logCritical("Error parsing feideattribs.xml"); } finally { feideattribs_stored = handler.getAttribs(); } }
    public HashMap getAttribs() {        AttribsHandler handler = new AttribsHandler();        SAXParserFactory factory = SAXParserFactory.newInstance();        try {            SAXParser saxParser = factory.newSAXParser();            saxParser.parse( new File(RequestUtil.PATH_FEIDEATTRIBS), handler);        } catch (Throwable t) {            t.printStackTrace();        }        return handler.getAttribs();    }