2

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

3
  • 2
    Are you talking about writing to one or reading one? Commented Aug 18, 2010 at 15:02
  • 1
    What is the question exactly? You want to parse/display a RSS feed using javascript? Or deliver your content using Javascript. The second is not possible completely using just javascript. Commented Aug 18, 2010 at 15:04
  • @Teja: Not possible with clientside javascript. Commented Aug 18, 2010 at 18:18

5 Answers 5

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

1

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

Comments

0

That depends what you mean. Probably not.

1 Comment

setting up a local news headlines rss feed that I can implement on a website. preferably something that can include associated images. For example: google.com/… I just wanted to make RSS feed a javascript framework..
0

look at this jQuery plugin. It works great

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.