X-ray spectrochemical analysis