X-ray energy spectrometry: Application in the study of the ion-exchange kinetics