Electron spectroscopic determination of the chemical valence state