Magnetic X-ray spectroscopy studies of dilute magnetic semiconductors