Javascript-форум (https://javascript.ru/forum/)
-   Events/DOM/Window (https://javascript.ru/forum/events/)
-   -   xml и dom (https://javascript.ru/forum/events/2711-xml-i-dom.html)

skyfish 03.02.2009 12:19

xml и dom
 
Вот xml
<newjobs>
<newjob>
<i>ИМЯ</i>
<name>ФАМИЛИЯ</name>
<caption>ОПИСАНИЕ</caption>
<cap>
<not>значение1</not>
<not>значение2</not>
<not>значение3</not>
<not>значение4</not>
<not>значение5</not>
<not>значение6</not>
</cap>
</newjob>
<newjob>
<i>ИМЯ2</i>
<name>ФАМИЛИЯ2</name>
<caption>ОПИСАНИЕ3</caption>
<cap>
<not>значение11</not>
<not>значение22</not>
<not>значение33</not>
<not>значение44</not>
<not>значение55</not>
<not>значение66</not>
</cap>
</newjob>
</newjobs>




как достучаться до значения "значение11"
var xmlDoc = request.responseXML.documentElement;
var showimg1=xmlDoc.getElementsByTagName("cap")[1].getElementsByTagName("not")[0].nodeValue;

	alert(showimg1);
не помогает

x-yuri 03.02.2009 17:52

getElementsByTagName("not")[0].firstChild.nodeValue


Часовой пояс GMT +3, время: 06:07.