X-Ray spectroscopic studies of copper-zinc and copper-magnesium mixed ferrites (Cux Zn1-x Fe2O4 and Cux Mg1-x Fe2O4)