X-ray photoemission and optical spectra of NiPS3, FePS3 and ZnPS3