var HM = new Array(); HM[1] = "<name>Имя</name>"; var x = document.createElement('div'); x.innerHTML = HM[1]; alert( x.getElementsByTagName('name')[0].innerHTML );