  Motivated by recent core-level x-ray photoemission spectroscopy (XPS), x-ray
absorption spectroscopy (XAS) and resonant inelastic x-ray scattering (RIXS)
experiments for the newly-discovered superconducting infinite-layer nickelate,
we investigate the core-level spectra of the parent compounds NdNiO$_2$ and
LaNiO$_2$ using the combination of local density approximation and dynamical
mean-field theory (LDA+DMFT). Adjusting a charge-transfer energy to match the
experimental spectra, we determine the optimal model parameters and discuss the
nature of the NdNiO$_2$ ground state. We find that self-doping from the Nd 5$d$
states in the vicinity of the Fermi energy prohibits opening of Mott-Hubbard
gap in NdNiO$_2$. The present Ni $L_3$ XAS and RIXS calculation for LaNiO$_2$
cannot explain the difference to NdNiO$_2$ spectra.
