code: public static MsmsPipelineAnalysis parse(Path path) throws FileParsingException {
  
      try {
        XMLStreamReader xsr = JaxbUtils.createXmlStreamReader(path, false);
        MsmsPipelineAnalysis msmsPipelineAnalysis = JaxbUtils
            .unmarshal(MsmsPipelineAnalysis.class, xsr);
        return msmsPipelineAnalysis;
      } catch (JAXBException e) {
        throw new FileParsingException(
            String
                .format("JAXB parsing of PepXML file failed (%s)", path.toAbsolutePath().toString()),
            e);
      }
    }
docs: The simplest method to parse the whole MsmsPipelineAnalysis from a file.
  
  @param path Path to the file
  @return MsmsPipelineAnalysis