The observation that electrons can be ejected from metals is analogous to the ionization of atoms and molecules. The difference is that the metals have a "sea of electrons" and the energies are not defined theoretically as easily as for for atoms. Instead, a work function is an empirical quantity. However, each metal has a specific work function.
Implications for X-ray photoelectron spectroscopy (XPS)
X-ray photoelectron spectroscopy is a powerful analystical techique used to detect specific elements on a surface. X-rays are used to eject electrons at characteristic energies, which are indicative of specific elements..