<title>XML Node List</title>
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if(this.status == 200 && this.readyState == this.DONE) {
findNamedNodeMap(xmlHttp);
xmlHttp.open("GET", "/examples/media/programming_languages.xml", true);
function findNamedNodeMap(xmlHttp) {
xmlObj = xmlHttp.responseXML;
attrList = xmlObj.getElementsByTagName("version")[0].attributes;
document.getElementById("text").innerHTML =
"첫 번째 version 요소의 status 속성값은 " + attrList.getNamedItem("status").nodeValue + "입니다.";
<button onclick="loadDoc()">속성 리스트 확인!</button>