Nanoscale imaging of buried topological defects with quantitative X-ray magnetic microscopy