Aims. We present results of the analysis of cometary X-ray spectra with an extended version of our charge exchange emission model (Bodewits et al. 2006). We have applied this model to the sample of 8 comets thus far observed with the Chandra X-ray observatory and acis spectrometer in the 300-1000 eV range. Methods. The interaction model is based on state selective, velocity dependent charge exchange cross sections and is used to explore how cometary X-ray emission depend on cometary, observational and solar wind characteristics. It is further demonstrated that cometary X-ray spectra mainly reflect the state of the local solar wind. The current sample of Chandra observations was fit using the constrains of the charge exchange model, and relative solar wind abundances were derived from the X-ray spectra. Results. Our analysis showed that spectral differences can be ascribed to different solar wind states, as such identifying comets interacting with (I) fast, cold wind, (II), slow, warm wind and (III) disturbed, fast, hot winds associated with interplanetary coronal mass ejections. We furthermore predict the existence of a fourth spectral class, associated with the cool, fast high latitude wind.