code: public static XNElement parseXML(File file) throws IOException, XMLStreamException {
          try (InputStream in = new FileInputStream(file)) {
              return parseXML(in);
          }
      }
docs: Parse an XML from the given file.
  @param file the file
  @return the parsed XElement tree
  @throws XMLStreamException if an error occurs
  @throws IOException if the file could not be found or other I/O error occurs