Trouble parsing XmlDocument returned from asmx from inside ajax query in javascript



So i have a .asmx web method that returns a XMLDocument. This service is called from inside a .aspx with javascript.


The query used is like this ,



$.ajax({
type: "POST",
url: 'http://ift.tt/1AJ3TOU',
contentType: "application/xml; charset=utf-8",
dataType: "xml",
success: function (msg) {
var data = new Array();
alert("Success calling web service");
xmlFromService = msg;
var rows = xmlFromService.getElementsByTagName("row");
for (i = 0; i < rows.length; i++) {
var cellArray = rows[i].children;

data[i] = {
// Some assignment operations here
};
}


The problem i am facing is that the value of rows is returned as 2 when i know there are thousands of rows in the xml returned from the web service. I am not sure what i am missing.


No comments:

Post a Comment