/ Published in: jQuery
A snippet setup to grab an XML file, parse it, and return the data contained within.
Expand |
Embed | Plain Text
jQuery.ajax({ type: "GET", url: "dates.xml", dataType: "xml", success: function(xml) { jQuery(xml).find('date').each(function(){ date = jQuery(this).find('value').text(); var output = '<span class="date">'+date+'</span>'; jQuery('body').append(jQuery(output)); }); } });
You need to login to post a comment.
