We use few-femtosecond soft x-ray pulses from high-harmonic generation to extract element-specific demagnetization dynamics and hysteresis loops of a compound material for the first time. Using a geometry where high-harmonic beams are reflected from a magnetized Permalloy grating, large changes in the reflected intensity of up to 6% at the M absorption edges of Fe and Ni are observed when the magnetization is reversed. A short pump pulse is used to destroy the magnetic alignment, which allows us to measure the fastest, elementally specific demagnetization dynamics, with 55 fs time resolution. The use of high harmonics for probing magnetic materials promises to combine nanometer spatial resolution, elemental specificity, and femtosecond-to-attosecond time resolution, making it possible to address important fundamental questions in magnetism.