Time‐dependent density functional theory calculations of X‐ray absorption