would like to load one specific node of the xml (by the id attrib)
(using a url parameter) the xml parameter (variable 'epParameter').
$(function() {
$.ajax({
type: "GET",
url: "episodes.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('Episode').each(function(){
var id_text = $(this).attr('id')
var name_text = $(this).find('Name').text()
$('<li></li>')
.html(name_text + ' (' + id_text + ')')
.appendTo('#Details ol');
});
}
});
});
Thanks, Phil.
No comments:
Post a Comment