Near-edge X-ray absorption fine structure spectroscopy