Structure of X-ray photoelectron spectra of lanthanide compounds