public boolean parseXmlResource(File file){
  Reader reader=null;
  try {
    reader=new BufferedReader(new FileReader(file));
    return parseXmlResource(file.getPath(),new InputSource(reader));
  }
 catch (  FileNotFoundException e) {
    logger.warning("Failed to open " + file + ":"+ e.getMessage());
    return false;
  }
 finally {
    if (reader != null) {
      try {
        reader.close();
      }
 catch (      IOException e) {
      }
    }
  }
}

public boolean parseXmlResource ( File file ) { Reader reader = null ; try { reader = new BufferedReader ( new FileReader ( file ) ) ; return parseXmlResource ( file . getPath ( ) , new InputSource ( reader ) ) ; } catch ( FileNotFoundException e ) { logger . warning ( "Failed to open " + file + ":" + e . getMessage ( ) ) ; return false ; } finally { if ( reader != null ) { try { reader . close ( ) ; } catch ( IOException e ) { } } } }
parse an xml resource by url . exceptions are logged rather than thrown . if an exception occurs the return value will be false to indicate that fact .
