code: public GPathResult parse(final File file) throws IOException, SAXException {
          final FileInputStream fis = new FileInputStream(file);
          final InputSource input = new InputSource(fis);
          input.setSystemId("file://" + file.getAbsolutePath());
          try {
              return parse(input);
          } finally {
              fis.close();
          }
      }
docs: Parses the content of the given file as XML turning it into a GPathResult object
  
  @param file the File to parse
  @return An object which supports GPath expressions
  @throws SAXException Any SAX exception, possibly wrapping another exception.
  @throws IOException An IO exception from the parser, possibly from a byte stream
  or character stream supplied by the application.