tags:

views:

130

answers:

5

.How can i convert rss to html to display it effectively?

A: 

you can use XSLT, or any java XML parser and write your own HTML. Like RssParser

Also see the question at SO: http://stackoverflow.com/questions/113063/java-rss-library

Priyank Bolia
A: 

You need to parse the the XML/RSS so find the items that you need and then html decode the description so the RSS item below would turn into

<item>
  <title>Site update</title>
  <link>http://www.theautomatedtester.co.uk/presentations/automated_performance_monitor_and_reporting.htm&lt;/link&gt;
  <description>
    &lt;p&gt;I have put a copy of my Google Test Automation Conference Slides up as well as the video from YouTube. There is also a link to the blog post about the work that David Henderson and I did for the talk.&lt;/p&gt;
  </description>
</item>

turns into

<p>I have put a copy of my Google Test Automation Conference Slides up as well as the video from YouTube. There is also a link to the blog post about the work that David Henderson and I did for the talk.</p>

that can be rendered in a browser

EDIT SINCE QUESTION HAS CHANGED

http://java-source.net/open-source/rss-rdf-tools http://java.sun.com/developer/technicalArticles/javaserverpages/rss_utilities/

AutomatedTester
why the downvote?
AutomatedTester
well looks like the question was rewritten from scratch after I answered.
AutomatedTester
That's not a reason for negative vote though, upvoted to balance this back to zero since as an answer this isn't a bad one at all.
Esko
+1  A: 

You could either use CSS to format the XML of the RSS feed directly or you could apply and XSLT to transform RSS into (X)HTML.

The following page is a good starting point for this:

Making RSS Pretty

0xA3
A: 

http://www.clapper.org/software/java/curn/

curn supports several output formats; you can configure one or more output handlers in curn's configuration file. A sample of curn's HTML output is herehere. A sample of curn's plain text output is here. curn supports, and uses internally, the FreeMarker template engine; you can easily generate another output format by writing your own FreeMarker template. In addition, you can write your own output handlers, in Java or in any scripting language supported by the Apache Jakarta Bean Scripting Framework (BSF) or (in Java 6) the javax.script API. See Writing Your Own Output Handler in the curn User's Guide for more details.

The MYYN
A: 

If you're prepared to program a little, you can use SaX or JDOM to fill data in a model (class representing elements in the RSS feed) and then process the model to output it to HTML. SaX is a standard API and is event driven. JDOM, on the other hand, loads the information from an RSS into a tree structure.

Tutorials:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPSAX.html
http://www.javaworld.com/javaworld/jw-05-2000/jw-0518-jdom.html

JDOM home page: http://www.jdom.org/

James P.