Annealing of nanodiamond at moderate temperature makes it possible to produce structures being intermediate in the carbon transformation from sp3 - to sp2 -state (graphite/diamond nanocomposites) and onion-like carbon (OLC). Electron microscopy shows such structures involve cage shells with spacing close to graphite. X-ray emission spectroscopy has been applied to examine the electronic structure of OLC and graphite/diamond nanocomposites. The CKα-spectra of OLC produced in the temperature range of 1600-1900 K were found to be markedly different from the spectrum of particles formed at 2140 K and characterized by better ordering of graphitic shells. The latter spectrum was shown to be very similar to the CKα-spectrum of polycrystalline graphite, while the former ones exhibited a significant increase of high-energy maximum that might be caused by the holed defect structure of graphitic networks forming at the intermediate annealing temperatures. To interpret experimental spectra, the quantum-chemical semiempirical AM1 calculation of icosahedral C540 cage and that with holed defects was carried out. The lack of at least 22% atoms in an internal carbon cage was found to be essential to provide an increase of density of high-energy electronic states similar to that observed in the spectrum of OLC produced at 1900 K.