Cu K-edge x-ray-absorption near-edge structure and electronic structure of Nd2-xCexCuO4-y and La2-xSrxCuO4.