We present an efficient method of inclusion of the core-valence correlations into the configuration interaction (CI) calculations. These correlations take place in the core area where the potential of external electrons is approximately constant. A constant potential does not change the core electron wave functions and Green's functions. Therefore, all operators describing interaction of M valence electrons and N − M core electrons (the core part of the Hartree-Fock Hamiltonian V N−M , the correlation potentialΣ1(r, r ′ , E) and the screening of interaction between valence electrons by the core electronsΣ2) may be calculated with all M valence electrons removed. This allows one to avoid subtraction diagrams which make accurate inclusion of the core-valence correlations for M > 2 prohibitively complicated. Then the CI Hamiltonian for M valence electrons is calculated using orbitals in complete V N potential (the mean field produced by all electrons);Σ1 +Σ2 are added to the CI Hamiltonian to account for the core-valence correlations. We calculateΣ1 andΣ2 using many-body perturbation theory in which dominating classes of diagrams are included in all orders. We use neutral Xe I and all positive ions up to Xe VIII as a testing ground. We found that the core electron density for all these systems is practically the same. Therefore, we use the sameΣ1 andΣ2 to build the CI Hamiltonian in all these systems (M = 1, 2, 3, 4, 5, 6, 7, 8). Good agreement with experiment for energy levels and Landé factors is demonstrated for all cases from Xe I to Xe VIII.