MzMLUnmarshaller unmarshaller = new MzMLUnmarshaller(file);
totalScans = unmarshaller
.getObjectCountForXpath("/run/spectrumList/spectrum");
MzMLObjectIterator<Spectrum> spectrumIterator = unmarshaller
.unmarshalCollectionFromXpath("/run/spectrumList/spectrum",
Spectrum.class);
try {
while (spectrumIterator.hasNext()) {