Marskie
Marskie

Reputation: 59

Is it possible to have a RSS feed by using a Javascript code?

Is it possible to have a RSS feed by using a Javascript code?

Upvotes: 2

Views: 2575

Answers (5)

sdfor
sdfor

Reputation: 6438

look at this jQuery plugin. It works great

http://www.zazar.net/developers/jquery/zrssfeed/

Upvotes: 0

Freyja
Freyja

Reputation: 40784

It is totally possible.

If you want to use a local feed (on your own domain), you can simply use AJAX and parse that RSS feed.. This does not, however, work cross-site (as you might know), and unfortunately you cannot use this to get RSS feeds from other domains. (If you don't know AJAX, you can learn it at W3Schools or Tizag).

But Google has a solution. Using the Google AJAX Feed API, you can read RSS feeds from other domains without AJAX. You can read the docs for it to get a basic understanding of how it works.

Upvotes: 2

Shawn
Shawn

Reputation: 7365

It's entirely possible. Create an Ajax request with JQuery.

  $.ajax({
   type: "GET",
   url: "[your xml rss url]",
   dataType: "xml",
   success: function(x) {
   $(x).find('foo').children().each(function(){

    if(this.nodeName == "bar")
    {
     var x = $(this).attr("bar1");
     var y = $(this).attr("bar2");
     var z = $(this).attr("bar3");
     return;

    }    

   });

Jquery-Ajax

Upvotes: 1

aepheus
aepheus

Reputation: 8187

An RSS feed is a type of xml file at a url. I'm not sure how you'd accomplish that with javascript (unless it's server side javascript). I think you need to do some homework on what you are trying to accomplish.

Upvotes: 1

Nate
Nate

Reputation: 30636

That depends what you mean. Probably not.

Upvotes: 0

Related Questions