AJAX XML
how a web page can fetch information from an XML file with AJAX ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Javeed M ShaikhPosted Nov 7, 2011, 12:49 AM
This should get you started...
$(document).ready(function(){
$.ajax({
type: "GET",
url: "myxml.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('element').each(function(){
var id = $(this).attr('id');
});
});
}
});
Vipul KelkarPosted Nov 9, 2011, 2:09 AM
you might refer to this article http://www.c-sharpcorner.com/UploadFile/Vipul.Kelkar/xml-with-jquery/ to make that code work in Internet explorer. The above code might not work in IE.
Thanks
Arjun PanwarPosted Nov 9, 2011, 12:11 AM
Thanks for this answer
Arjun PanwarPosted Nov 9, 2011, 12:09 AM
Thank you for given me the best answer
Prashant ChaudharyPosted Nov 7, 2011, 12:48 AM
Prashant ChaudharyPosted Nov 7, 2011, 12:48 AM