I am trying to read an XML response using getElementsByTagName :
var rows = items.responseXML.getElementsByTagName("z:row"); for (var i=0; i<rows.length; i++) {
The code works fine in Firefox and IE, but in chrome it throws null .. I mean that it does not receive any data. When I alert rows.length , it gives me 0 always in chrome.
Then I searched on google and realized that the problem was with xsd:element , and then I changed "z:row" only to "row" . It then worked in Chrome, but Firefox and IE returned 0 for rows.length .
Is there any method that is in all browsers?
source share