FAQs
DataSet dataset = FactoryMethods.importDataSetFromXML(new File("myfile.xml"));
DataSet dataset = new DataSet();
FactoryMethods.exportDataSetInXML(dataset, new File("myfile.xml"));
MzQuantMLParser mzqparser = new MzQuantMLParser("myfile.xml");
DataSet dataset = mzqparser.getDataSet();
A:Slightly more complicated as there isn't a factory JAXB method yet
DataSet dataset = new DataSet();
MzQuantMLExport export = new MzQuantMLExport();
export.export(dataset);
JAXBContext exportContext = JAXBContext.newInstance(ObjectFactory.class);
Marshaller jaxbMarshaller = exportContext.createMarshaller();
jaxbMarshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE );
jaxbMarshaller.marshal(export.getXML(), new File("myfile.jaxb"));