Quantcast
Viewing latest article 3
Browse Latest Browse All 10

Answer by sdepold for How to parse an RSS feed using JavaScript?

You can use jquery-rss or Vanilla RSS, which comes with nice templating and is super easy to use:

// Example for jquery.rss$("#your-div").rss("https://stackoverflow.com/feeds/question/10943544", {    limit: 3,    layoutTemplate: '<ul class="inline">{entries}</ul>',    entryTemplate: '<li><a href="{url}">[{author}@{date}] {title}</a><br/>{shortBodyPlain}</li>'})// Example for Vanilla RSSconst RSS = require('vanilla-rss');const rss = new RSS(    document.querySelector("#your-div"),"https://stackoverflow.com/feeds/question/10943544",    {       // options go here    });rss.render().then(() => {  console.log('Everything is loaded and rendered');});

See http://jsfiddle.net/sdepold/ozq2dn9e/1/ for a working example.


Viewing latest article 3
Browse Latest Browse All 10

Trending Articles