In-Situ High-Resolution X-Ray Spectroscopy Of Light Rare-Earth Compounds