Femtosecond X-ray absorption spectroscopy in warm dense matter