
This is catered for in the RssReader class via the member variable RdfMode, which is set to false by default. The main way these RDF documents differįrom their RSS counter-parts is the nodes are children of the main root RSS (or in this case rdf) node, rather than the node. There were a couple of RDF feeds which I wanted to use, specifically the feed and the feed. The format caters for describing the content of the web resource, including items such as title, description and URL. RDF (Resource Description Framework) is an W3C XML format for describing web resources. Included in the RssReader is the ability to read simple RDF format feeds. Details of the tokens are in the documentation. These tokensmap to the RSS fields available. This is a simple tool I wrote to turn a RssFeed object into an HTML (or any other format) document, given a template containing tokens. Also included in the class library is a class called RssHtmlMaker. I added several static methods to make the process even simpler, they're all self explanatory. This URL can be in the format of file:// as well as the standard if you want to open a local file (it's not been tried with ftp://). The RssReader class has one main method, RetrieveFeed which returns an RssFeed object, given a URL. The RssItem type maps to an RSS item, containing most of the fields available to an RssItem. There is an Items property, which contains a collection of RssItem objects. In this are most (some haven't been implemented in this version) of the fields that RSS offers. Given the simplicity of the RSS format, it was straightforward to map its structure to a value type ( struct).The image below shows the RssFeed object. Each item node contains elements to describe themselves - title, description and link are the 3 required elements, there are other optional ones which you can read about in the specification and the RssReader class docs. Then, after these is a list of articles, headlines, stories or whatever they contain in the form of item nodes. Inside this channel node, there are a number of elements to describe the feed. As the image below shows, it contains a root RSS node, which has a channel node beneath it. The RSS format is true to its name - simple. For example, the New York Times provide an RSS feed of their main headlines, which you can access and put inside your own site or application. It's an XML format for retrieving, typically, headlines or the latest article details from other sites.

The RSS (Really Simple Syndication) specification is found at. The class, as its name suggests, only reads RSS feeds - it has no capabilities for writing feeds. The purpose of this, RssReader class, is to provide a simple tool for retrieving RSS feeds from remote and local sources, without needing to parse XML in each application you require the RSS feed in.
#Javascript rss feed reader example code
With podcast RSS feeds, having a direct feed address allows listeners to subscribe using any podcast player application.There's already quite a comprehensive RSS tool on The Code Project: RSS 2.0 Framework written by "Jerry Maguire".
#Javascript rss feed reader example how to
Rather than having to visit each website and scan for new content, your RSS feed readers will curate a list for you in one place of the most recent posts along with a brief summary of what the content is about.Ĭlick here to learn how to create an RSS Feed for your website.Ĭlick here to learn how to create a Podcast RSS Feed. With a website’s RSS feed, you can add the address to an RSS feed reader to receive a daily digest of the latest content released by your favorite outlets. The other type of RSS feed is for audio such as podcasts, music, or audiobooks. Written media RSS feeds are those you would find on a news outlet, blog, or some other written content.

There are several types of RSS feeds, but the two most common ones are for written media and audio media.
