X-ray Spectroscopy and Magnetism in Mineralogy