Is it possible to have a RSS feed by using a Javascript code?
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.
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;
}
});
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.