code: public static Document parse(File xmlFile, EntityResolver resolver) {
  
          try {
              DocumentBuilder parser = createParser(resolver);
              return parser.parse(xmlFile);
          }
          catch (Exception e) {
              throw new PluginException("Error parsing XML document '" + xmlFile + "': " + e, e);
          }
      }
docs: Parse an XML document (with appropriate flags for our purposes) from the file.
  
  @param xmlFile file to be parsed.
  @param resolver resolver to be used for parsing
  @throws PluginException for all errors