I'm trying to read the Flickr feed in order to parse the images. However, the images are in the media:thumbnail t开发者_如何学Goag. Where would I begin to make a mediaRSS parser? Does anyone have an example?
I recommend jQuery.getJSON(). As far as i know Flickr provides a JSON feed.
Here is an example from a current project using jQuery and xml:
$("#loading").show();
$.ajax({
type: "GET",
url: "/path",
dataType: "xml",
success: parseXml
});
function parseXml(xml) {
$(xml).find("item").each(function() {
$("#news_list").append('<p>Content</p>');
$("#loading").hide();
});
}
Works awesome!
You only have to change the datatype to json
.
精彩评论