X-ray K-absorption edge analysis of chlorine in complex compounds