There is a large number of X-ray sources in outer space, like active galactic nuclei or our own sun. In these objects, highly charged iron ions, i.e., iron atoms with most of their electrons stripped off, play a major role. To understand the processes in space, a precise knowledge of the electronic structure of these ions is necessary. Therefore, they are prepared in the laboratory with an electron beam ion trap, and investigated with X-ray photons from synchrotrons or free-electron lasers. By this means, discrepancies between experiments and theoretical predictions are found.