X-rays in atomic and nuclear physics