Hi, can anyone help me with this XML parsing issue?
My xml is:
<?xml version="1.0" encoding="utf-8"?>
<shop title="ramesh">
<raj title="title">name</raj>
</shop>
My jquery is :
$(function(){
$.get("shop.xml", function(data){
var shopInfo = $(data).find("shop").attr('title');
var showowner = $(data).find("raj").attr('title');
alert(shopInfo+':'+showowner);
})
})
When I alert in Firefox it alert the shopInfo is "null" and show owner "title" and I case if I check with IE, and Chrome, I am getting "null:null" in the alert message.
Can any one tell me what I am doing wrong?
I need my jquery to get xml data properly from to all browsers, for that any suggestion please?