Mn and Co doped TiO2 thin films with varying doping concentrations have been prepared by r.f magnetron sputtering technique. Preliminary structural characterization of the samples have been carried out by Grazing Incidence X-ray diffraction (GIXRD) measurements. Detail studies by X-ray Absorption Spectroscopy (XAS), which comprises of both X-ray Near Edge Structure (XANES) and Extended X-ray Absorption Fine Structure (EXAFS) techniques, have been carried out on the samples at dopants (Mn,Co) and host (Ti) K-edges to have an overall information on the local structures around the above atomic sites of the samples. The information obtained above have been corroborated by O K-edge XANES, metal L-edge XAS measurements and theoretical simulations of XANES spectra also. Finally room temperature ferromagnetism observed in the doped TiO2 samples has been explained on the basis of the above structural information.