code: public void parse(File xmlFile) throws XMLStreamException {
      try (InputStream input = java.nio.file.Files.newInputStream(xmlFile.toPath())) {
        parse(input);
      } catch (IOException e) {
        LOG.debug("Cannot access file", e);
      }
    }
docs: parse XML stream:
  
  @param xmlFile - java.io.File = input file
  @exception XMLStreamException javax.xml.stream.XMLStreamException