We report x-ray absorption near-edge measurements of YBa{sub 2}(Cu{sub 1{minus}{ital x}M{ital x}}){sub 3}O{sub 7{minus}{delta}} ({ital M}=Fe, Co, Ni, and Zn). Our study is primarily to determine several important material parameters, i.e., the location of dopants, the valence of dopants, structural changes, modifications of electronic densities of states, and the distribution of holes, which are thought to be key factors for understanding mechanisms causing the suppression of superconductivity via metal doping. Our results indicate that each metal substituent has a preference for a specific Cu site or combination of sites. We find that Fe and Co preferentially substitute for the Cu(1) atom at the linear-chain site; Ni resides in both Cu(1) and Cu(2) (the plane site); Zn occupies only the plane position Cu(2). In all cases, the metal-oxygen bond lengths (Fe-O, Co-O, Ni-O, and Zn-O) and valence states of dopant (mainly Fe{sup 3+}, Co{sup 3+}, Ni{sup 2+}, and Zn{sup 2+}) show little dependence on dopant concentration. Metal doping also has little effect on the valence of copper. However, each dopant affects to a different degree the oxygen 2{ital p} states. The changes of the oxygen 2{ital p} states for Fe-, Co-, and Ni-doped samples may be related to a reduction ofmore » some oxygen hole states. This reduction is attributed to a redistribution of charge carriers in the chain layer and possibly an inhibition of charge transfer from the chains to the planes. However, Zn substitutions show no observable change in its valence and oxygen hole states, indicating a different mechanism for suppression of superconductivity. Several possible explanations are offered that may elucidate the large suppression of {ital T}{sub {ital c}} in the Zn-doped case.« less