@author Albert T. Wong (atwong@alumni.uci.edu)\\
@version 1.0 developed for JSPWiki 2.0.52\\
  \\
Code is Apache Software Foundation Licensed\\
  \\
How to use this:\\
Drop this file in the %classpath%/albertwong or if you have the JAR, drop the JAR into the java lib folder.\\
Add all the jars into the java lib folder.  (I'm using the entire Apache Commons package along with Xerces).\\
\\
Syntax: [[{albertwong.~RSSRDFReaderPlugin url='http://rss.com.com/2547-12-0-5.xml' detail='1'}]\\
  \\
Arguments:\\
url = String. url of newfeed\\
size = Optional. integer. Default 10. size of items to show\\
hrTop = Optional. integer.  Default 0. > 0 means show.  Other means no show.\\
hrBottom = Optional. integer. Default 0.  > 0 means show.  Other means no show.\\
table = Optional. integer. Default 0.  > 0 means show.  Other means no show.\\
detail = Optional. integer. Default 0.  > 0 means show.  Other means no show.\\
 
----

!Discussion

This is very cool!  Thank you! :-) --JanneJalkanen

Can somebody explain why the feed: 'http://dwlt.net/tapestry/dilbert.rdf' is not working?
I get: Error! Unable to understand/read the RSS Newsfeed.

If you're getting an error about Log4J, remove the commons-logging.jar.  Somehow jspwiki code and Apache Commons Logging JAR do not like each other (in future, jspwiki code should use Commons Logging for "good design" as all Apache Jakarta projects are now using it). --AlbertWong

;:''The last time I looked, commons-logging.jar created FAR more dependencies and problems than log4j.  I don't want to include any extra stuff, if I can avoid it.  Most of Jakarta Commons stuff relies too much on other things.  I hate it.  I would really, really like to use it, but...  In fact, I'm thinking if we should mandate JDK 1.4, just because then I could use the built-in logging: at least with that there should be far less confusion about things, even though it's not a nowhere near-optimal solution --JanneJalkanen''

;:Fair comment... but I would say that JDK 1.4 means that it would break this code to all previous version (JDK, app servers, etc etc).  The point of Apache Common Logging was being a thin wrapper to the real logging tool.  So, the interfaces remain the same while the implementation is different.  This solution has been thought over a lot already and that's why Apache is moving in that direction. Of course, I'm not saying go code it that way, I'm saying there is a reason why so many are doing this.  As for comments on Apache Commons, it only relies on all the other Common libraries.. that's a matter of opinion. I use the libraries because it's nice to have utilities that I usually want/need.  Why learn all these utilities when you can learn a single set that is good and free? --Albert

Someone mention you're gettin errors with a certain feed.  The code uses the RSSReader used in Apache Commons.  I believe it only support certain versions of RSS/RDF.  I think the safe one to use is RSS 0.91.  There are others, but I don't know off the top of my head. If it works, great, if not.. oh well.  You're more than welcome to contrib to the code base (I would recommend upgrading the one in Apache Commons so that all may benefit and then we'll just have to pull the new JAR from Apache and viola! --AlbertWong

;:''There are multiple RSS formats (0.91, 0.92, 0.93, 1.0, 2.0).  It is very confusing. --JanneJalkanen''

;:Yes.. I'm saying that my plugin only supports certain version.. I don't know the full list.  As for confusing.... move to ATOM, it's better anyhow and was better designed. --AlbertWong


if you try parsing with jspwiki's own feed , say by inserting: 

[[{INSERT albertwong.RSSRDFReaderPlugin url=http://www.jspwiki.org/rss.rdf' detail='0'}]]

it doesnt work; not even if you change the feed extension to .xml . Apart from that it is indeed a great plugin.

;:Maybe you could have a look at [Informa|http://informa.sourceforge.net/], it's a RSS aggregator library which supports all RSS versions. -- [Jawe]
** unfortunately not "all RSS versions" - Atom support is not yet included, but [it seems to be on its way|http://www.magpiebrain.com/archives/2004/05/27/atom] --MannyMoura

;:I just implemented Informa plugin for myself.  Works with 0.91, 1.0 and 2.0 RSS. Amazing it can read the JSPWiki RDF feeds in JUnit tests but I get problems running it in Websphere runtime. --AlbertWong


;:Ahh.. searched on Google. Seems that Websphere 5.0 uses a old jdom.jar in /opt/WebSphere/AppServer/lib.  Upgraded it to b9. See [http://it.cappuccinonet.com/strutscx/tools/strutscx_websphere.htm] for more details. Everyone is now gravy. --AlbertWong


** It works fines for .rdf feed types, if you're using JSPWiki with Jetty. It doesnt work for .atom feeds , for instance http://blogger.com/knowledge/atom.xml or http://www.google.com/googleblog/atom.xml  --MannyMoura

* [Rome|https://rome.dev.java.net/] is another Java API which provides RSS parsing capabilities. Unlike the more mature Informa it also supports Atom.Today it accepts all flavors of RSS (0.90, 0.91, 0.92, 0.93, 0.94, 1.0 and 2.0) and Atom 0.3 feeds. Their comparison with Informa makes interesting reading - they state that Informa is hard to use!  --MannyMoura