Attosecond state-resolved carrier motion in quantum materials probed by soft x-ray XANES