A theoretical calculation of X‐ray absorption cross sections