[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 624
  • Last Modified:

How to implement RSS feed in an application

Hi,

In my web application i want to implement RSS feed feature. could anybody help me in this regard.
0
CIPL-Senthil
Asked:
CIPL-Senthil
1 Solution
 
vaska94Commented:
0
 
rkpanidarapuCommented:
Well, here's a partial solution that might give you a lead.  I have RSS implemented in my site, wherein I grab the rss feed and redisplay using xsl stylesheets.  However if the feed URL is unavailable it throws an exception error, which does not look so good.  If anyone has some suggestions to help close the args and maybe even display an error message a la "No Information is available at this time" blah blah would be greatly appreciated.

C# code:

 

1    // Need to add close statement and timeout with error message in case of no response
2    private void Page_Load(object sender, System.EventArgs e)
3          {
4          WebRequest request = WebRequest.Create
5            //RSS URI Path
6            ("http://examplerssfeed.com/foo.xml");
7          WebResponse response = request.GetResponse();
8          Stream responseStream = response.GetResponseStream();
9          XmlTextReader reader = new XmlTextReader(responseStream);
10         XmlDocument xml_doc = new XmlDocument();
11         xml_doc.Load(reader);
12         fetchXML.Document = xml_doc;
13         }

  Call to xsl stylesheet for display of rss:

 

<asp:xml id="fetchXML" runat="server" TransformSource="stylesheet.xsl"></asp:xml>
0
 
CIPL-SenthilAuthor Commented:
can anybody explain me with an simple example how to implement RSS feed in a web application. The links you are providing is giving only partial data. So could anybody explain me completely with a simple example how to implement it.

Please dont suggest in any other language other than java.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Ray PaseurCommented:
Couple of things you might want to do.

1. Tell us what you mean by "implement" - do you want to consume RSS from an outside source or publish RSS from your own data?

2. Click "REQUEST ATTENTION" and ask a moderator to add this to the Java Zone.

Best of luck with it (and if you decide you want to do it in PHP, please post a new question and I will be glad to help). ~Ray
0
 
CIPL-SenthilAuthor Commented:
I want to publish RSS from my own data.
0
 
Tomas Helgi JohannssonCommented:
       Hi!

Check out these links
http://www.rgagnon.com/javadetails/java-0556.html
http://www.vogella.de/articles/RSSFeed/article.html

Other RSS tutorial
http://www.mnot.net/rss/tutorial/

Hope this helps.

Regards,
    Tomas Helgi
0
 
CIPL-SenthilAuthor Commented:
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now