X-ray emission spectroscopy: an effective route to extract site occupation of cations