I'm very new to google API and ajax-jquery, I have below link https://maps.googleapis.com/maps/api/place/details/xml?placeid=Ej02MDcgU291dGh3ZXN0IEtleXN0b25lIFN0cmVldCwgQmVudG9udmlsbGUsIEFSLCBVbml0ZWQgU3RhdGVz&key=API_KEY
I need to write an jquery to get this xml response. Can someone help me?
This should probably be all you need? http://api.jquery.com/jquery.ajax/
Of course most browsers won't allow you to request content from a different domain than the one you are browsing at.
So that means that you will only be able to request the xml if you execute the ajax request somewhere within maps.google.com. (You can press F12 and paste code into there while browsing maps.google.com.)
A simple request:
var url = "https://maps.googleapis.com/maps/api/place/details/xml?placeid=Ej02MDcgU291dGh3ZXN0IEtleXN0b25lIFN0cmVldCwgQmVudG9udmlsbGUsIEFSLCBVbml0ZWQgU3RhdGVz&key=API_KEY";
var request = $.ajax(url).complete(function(){
console.log(request.responseText);
});
You could also use .responseXML if you want to navigate a DOM tree with javascript.
Edit: Here is some info on the security around cross-domain requests: