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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Javeed M ShaikhRank #839 · 2.7K reputationPosted Nov 6, 2011, 7:49 PM EST
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');
});
});
}
});
Prashant ChaudharyRank #1,151 · 1.6K reputationPosted Nov 6, 2011, 7:48 PM EST
protected void btnHelloWorld_Click(object sender, EventArgs e) { lblHelloWorld.Text = "Hello, world - this is a fresh message from ASP.NET AJAX! The time right now is: " + DateTime.Now.ToLongTimeString(); } like this you can fetch informationPrashant ChaudharyRank #1,151 · 1.6K reputationPosted Nov 6, 2011, 7:48 PM EST
protected void btnHelloWorld_Click(object sender, EventArgs e) { lblHelloWorld.Text = "Hello, world - this is a fresh message from ASP.NET AJAX! The time right now is: " + DateTime.Now.ToLongTimeString(); } like this you can fetch informationArjun PanwarRank #254 · 9.9K reputationPosted Nov 8, 2011, 7:09 PM EST
Thank you for given me the best answer
Arjun PanwarRank #254 · 9.9K reputationPosted Nov 8, 2011, 7:11 PM EST
Thanks for this answer
Vipul KelkarRank #1,061 · 1.8K reputationPosted Nov 8, 2011, 9:09 PM EST
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