Determination of the Primary Excitation Spectra in XPS and AES