Recent measurements of the K-shell and L-shell x-ray spectra of highly charged heliumlike and neonlike ions are presented that were performed on the Livermore electron beam ion traps and the Princeton tokamaks. These measurements provide new insights into collisional and indirect line formation processes, identifications of forbidden lines, and a new plasma line diagnostic of magnetic field strength.