I need to get a xml string from the server, which is formatted as:
<xml><material>
<record>
<id>..</id>
<name>..</name>
<quantity>..</quantity>
<plink>..</plink>
</record>
<record>
..
</record>
</xml></material>
Client side get this xml and process it:
$.ajax({
url:'getrecords.php',
cache:false,
type:"GET",
dataType:'html',
success:function (html){
var records=$(html).find("record");
alert(records.length);
}
My problem is that, this code is working fine in Chrome and Firefox but not in IE 8.0 (I am using 8.0) It alerts 0 in IE while it alerts the correct length in chrome and firefox.
I try this but it also shows length of records is 0 in IE but fine in Chrome
var records=$("<xml><root><item></item></root></xml>").find("item");