X-ray photoelectron spectroscopy of halomethanes