if ( res.getMimeType().equals("text/html") ) {
if ( res.getMimeType().equals("text/html") || res.getId().endsWith(".htm") || res.getId().endsWith(".html") ) {
    private void setupParser(Collection collection, LocalXMLResource res) throws XMLDBException {        if ( res.getMimeType().equals("text/html") ) {            try {                Class clazz = Class.forName( "org.cyberneko.html.parsers.SAXParser" );                XMLReader htmlReader = (XMLReader) clazz.newInstance();                collection.setReader( htmlReader );            } catch ( Exception e) {                LOG.info("nekohtml parser not found. If you want to parse non-wellformed HTML files, put nekohtml.jar into " +                        "directory lib/optional/");            }        }    }