Connecting Tech Pros Worldwide Help | Site Map

How to handle Muli-record of responseXML?

  #1  
Old May 17th, 2007, 04:55 AM
Cylix
Guest
 
Posts: n/a
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!

  #2  
Old May 17th, 2007, 06:35 PM
Bart Van der Donck
Guest
 
Posts: n/a

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