code: public boolean read(File inputFile) throws SAXException, IOException {
          boolean success = false;
          try (FileInputStream fs = new FileInputStream(inputFile)) {
              XMLReader parser = XMLReaderFactory.createXMLReader();
              parser.setErrorHandler(this);
              parser.setContentHandler(this);
              parser.parse(new InputSource(fs));
              success = true;
          }
          return success;
      }
docs: Reads the document and pre-parses it. The other method is called
  automatically when a start markup is found.
  
  @param inputFile the file to read
  @return a boolean if the parser ends successfully or not
  @throws SAXException
  @throws IOException