Study of the electronic structural variation of transition metal oxides by X-ray absorption spectroscopy