Using the SuperEBIT electron-beam ion trap and a flat-field spectrometer, we observed extreme ultraviolet spectra of highly charged ions of Xe and measured the wavelengths of prominent lines from Li-, Be-, B-, Na-, and Mg-like ions. Our results for Li-and Na-like ions are as precise as the best available elsewhere. The results for Be-, B-, and Mg-like ions are much more precise than available data or extend those available from lower-Z ions and reveal significant shortcomings of the various theoretical predictions.