First-principles calculations were performed on the electronic structure and x-ray-absorption near-edge structure (XANES) of amorphous Zr-oxide and Hf-oxide thin films. Using the discrete variational X-alpha method, the authors simulated the films with (Zr(4)O(17))(-18) and (Hf(4)O(18))(-20) clusters. The O-Zr and O-Hf bonds were found to have different characteristics along the bond orientation. By comparing the experimental and calculated XANES, we analyze the absorption mechanism of amorphous Zr-oxide and Hf-oxide thin films for energies up to 10 eV above the O K edge. (C) 2005 American Institute of Physics.