Where exactly are you passing the data to the function, I think you need to do:
$(document).ready(function () {
$.ajax({
url: 'http://theresidency.libsyn.com/rss',
type: 'GET',
dataType: "xml",
success: function(data) {
parseXml(data);
}
});
});
function parseXml(xml) {
var item = $(xml).find("item");
$(item).each(function() {
$("#results").append($("enclosure").attr("url").text() + "<br />");
});
}
or just:
$(document).ready(function () {
$.ajax({
url: 'http://theresidency.libsyn.com/rss',
type: 'GET',
dataType: "xml"
}).done(function(xml) {
$.each($("item", xml), function(i, e) {
$("#results").append($("enclosure").attr("url").text() + "<br />");
});
});
});
EDIT:
Did some more fiddling with this, and came up with:
$(document).ready(function () {
$.ajax({
url: 'http://query.yahooapis.com/v1/public/yql?q=%20SELECT%20*%20FROM%20xml%20WHERE%20url%3D%22http%3A%2F%2Ftheresidency.libsyn.com%2Frss%22&format=json&callback=',
dataType: "json"
}).done(function(data) {
$.each(data.query.results.rss.channel.item, function() {
$("#results").append(this.enclosure.url + "<br />");
});
});
});?
I do believe that is what you are looking for, here's a DEMONSTRATION
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…