Во-первых: вы не можете получить данные из другого домена, так как политика crossdomain . Я не знаю о jfeed, но в своих проектах я придумал это решение. С помощью этой простой функции вы можете сэкономить некоторую полосу пропускания и накладные расходы кода.
Рабочий пример
http://intervisual.de/stackoverflow/fetchxml/index.html
proxy.php (источник: http://jquery -howto.blogspot.com / 2009/04 / cross-domain-ajax-querying-with-jquery.html )
<?php
// Set your return content type
header('Content-type: application/xml');
// Website url to open
$daurl = 'http://www.craigslist.org/about/best/all/index.rss';
// Get that website's content
$handle = fopen($daurl, "r");
// If there is something, read and return
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);
}
?>
JQuery
$.ajax({
type: "GET",
url: "proxy.php",
dataType: "xml",
success: parseXml
});
function parseXml(xml) {
console.log(xml);
$(xml).find("item").each(function() {
var content = $(this).find("title").text()
$("#news_list").append('<li>' + content +'</li>');
});
}
HTML
<div id="news_list"></div>