code: public static Document parse(Path path, boolean validation) throws IOException, SAXException, IllegalArgumentException {
          return parse(path.toFile(), validation);
      }
docs: Parses XML to a W3C Document object with activated or deactivated validation.
  In case of validation, a correct header is needed. Therefore, we try to fix the
  header before we try to parse the input. Also, an error handler is activated
  that throws {@link SAXException} if an error due the validation or parsing process
  will be thrown.
  <p>
  In case of deactivated validation, there will be no SAXException occur!
  
  @param path       to a XML file
  @param validation turn validation on or off
  @return Document of XML object.
  @throws IOException              if an IO error occurs
  @throws SAXException             only occurs when validation is on and an error due parsing the document occurred.
  @throws IllegalArgumentException if the argument is null