Connecting Tech Pros Worldwide Forums | Help | Site Map

How to handle Muli-record of responseXML?

Cylix
Guest
 
Posts: n/a
#1: May 17 '07
I have read a number of article about the responseXML,
all articles just mention one row XML, I mean
<book>
<name>The Sea</name>
<authur>Jogn</authur>
</book>

javascript:
xmlHttp.responseXML.documentElement.getElementsByT agName("name").childNodes[0].nodeValue

But no one talk about XML like the following:
<book>
<name>The Sea</name>
<authur>Jogn</authur>
</book>
<book>
<name>The Sea2</name>
<authur>Jogn</authur>
</book>

How to handle in javascript for the 2nd XML?
Thanks!


Bart Van der Donck
Guest
 
Posts: n/a
#2: May 17 '07

re: How to handle Muli-record of responseXML?


Cylix wrote:
Quote:
I have read a number of article about the responseXML,
all articles just mention one row XML, I mean
<book>
<name>The Sea</name>
<authur>Jogn</authur>
</book>
>
But no one talk about XML like the following:
<book>
<name>The Sea</name>
<authur>Jogn</authur>
</book>
<book>
<name>The Sea2</name>
<authur>Jogn</authur>
</book>
XML can only have one root tag (<book/of your first example). For
your second example, you could surround it by <library/or something
and it'll be okay.

--
Bart

Closed Thread


Similar JavaScript / Ajax / DHTML bytes