Chemical binding and electron correlation effects in x‐ray and high energy electron scattering