X-ray Absorption and Magnetic Scattering