code: public void checkXmlFile(File file) throws IOException, SAXException {
          validator.reset();
          InputSource is = new InputSource(new FileInputStream(file));
          is.setSystemId(file.toURI().toURL().toString());
          checkAsXML(is);
      }
docs: /* *
  Checks an XHTML document or other XML document.