X-ray and UV photoelectron spectra of the oxides NbO2, MoO2 and RuO2