We report combined experimental and theoretical investigations of x-ray absorption at the Ru-L 2,3 and O-K thresholds of the Ru͑IV͒ compounds RuO 2 and Sr 2 RuO 4 and of the Ru͑V͒ compound Sr 4 Ru 2 O 9 . Significant differences in the intensity distribution of the t 2g -related and e g -related peaks between the L 3 and the L 2 edges are found, due to the combined effects of 4d spin-orbit coupling and the interelectronic Coulomb interaction described by the Slater integrals. The observed spectral features can be well reproduced by crystal-fieldmultiplet calculations. With increasing the Ru valence from IV to V, the spectra are shifted by Х1.5 eV to higher energy at the Ru-L 2,3 edges and Х1.0 eV to lower energy at the O-K edge, which is of the same order of magnitude as on going from the divalent to the trivalent late 3d transition-metal oxides.