X-ray absorption near edge structure (XANES) spectra of DNA and the nucleobases (adenine, guanine, cytosine, thymine and uracil) are observed using monochromatic soft X-rays (400-560 eV). The photon energy range includes the electron binding energy of the core orbital of nitrogen and oxygen K shell. Obtained XANES spectra showing a characteristic structure were theoretically analyzed by the discrete variational density functional formalism (DV-Xα) method. These results clearly indicate that the photo-excitation of oxygen and nitrogen 1s electron to π * orbitals shows a sharp resonance profile rather than that to σ * orbitals, enough to realize selecting a photochemical reaction site at specific nucleobases in a DNA molecule. Novel experiments are proposed based on the obtained spectra to understand the molecular mechanisms of radiation damages on DNA bases.