X-ray absorption spectroscopy on magnetic nanoscale systems for modern applications