Many work deal with diamond and related materials (c-BN and the hypoth
etical C3N4 compound) thin films synthesis. It is necessary to charact
erize the structure of such films at the atomic scale. The X ray absor
ption (XAS) and electron energy loss (EELS) spectroscopies are well ad
apted for such purposes, but they raise a difficult problem for theore
tical codes due to large chemical bonding effects at low energies. Tak
ing diamond as an example, we will show that FEFF6 is adequate for EXA
FS calculations. Furthermore, FEFF6 can be used as a starting point of
a new XANES code that includes an exact full multiple scattering calc
ulation. The usefulness of this new code will be illustrated by compar
ing theoretical XANES (diamond) and ELNES (c-BN) spectra. Results rela
ted to the theoretically predicted C3N4 compound will be also briefly
discussed.