The photoabsorption spectrum of the C60 molecule and those of Xe and Ba atoms inside the C60 molecule are calculated using a jelliumlike model for the confining cage. The dynamic electronic response to an external electric field is obtained through time-dependent density-functional theory. The photoabsorption cross section for C60 shows strong collective resonances corresponding to plasmonlike excitations. The resonant 4d photoemission of the free atom is suppressed by the carbon cage, resulting in a weakly oscillating spectrum.Peer reviewe