Information Content and Analysis of X-ray Absorption Spectroscopy and X-ray Emission Spectroscopy Using Machine Learning