Structural and electronic characterization of nano-sized inorganic materials by X-ray Absorption Spectroscopies