I'm using Google Feeds API to pull create a list of headlines from an RSS feed.
I'm using the "entry.link" attribute to get a URL for the href of an item in the list. According to
documentation this should return the <link> attribute in the RSS feed, but it is instead returning the <guid>, which is a different value (and not what I want).
The "Recent stories from the Austin Homicide Project" list shows the returns. Note the href is something like:
<script type="text/javascript">
google.load("feeds", "1");
function initialize() {
var feed = new google.feeds.Feed(RSS_feed);
feed.setNumEntries(20);
feed.load(function(result) {
if (!result.error) {
var container = document.getElementById("feed");
for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
var li = document.createElement("li");
li.innerHTML = '<a href="' + entry.link + '">' + entry.title + '</a>';
container.appendChild(li);
}
}
});
}
google.setOnLoadCallback(initialize);
document.write("<h4>Recent stories from the Austin Homicide Project<\/h4>");
document.write("<div id=\"medleycontent\">");
document.write(" <ul id=\"feed\">");
document.write(" <\/ul>");
document.write("<\/div>");
</script>