The obscured fraction of active galactic nuclei in the XMM-Cosmos Survey: a spectral energy distribution perspective uri icon