X-ray absorption near edge spectroscopy