Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

parse RSS feed -System.out

843840Oct 14 2009 — edited Oct 14 2009
Hi,

As below i have been reading RSS feeds.

When i execute the parser.parse(url) method i get a dump of the xml bones from the feed onto System.out, which in my case is a catalina log file.

Is there any way/method that im not aware of that can prevent this going to System.out?
public void readRSSDocument() throws Exception {
        //Create the parser
        RssParser parser = RssParserFactory.createDefault();
        //Parse our url
        Rss rss = parser.parse(
                new URL("http://rss.cnn.com/rss/cnn_world.rss"));
    }
output:
<rss>
<channel>
<title>
</title>
<link>
</link>
<description>
</description>
<language>
</language>
<copyright>
</copyright>
<pubDate>
</pubDate>
<ttl>
</ttl>
<image>
<title>
</title>
<link>
</link>
<url>
</url>
<width>
</width>
<height>
</height>
<description>
</description>
</image>
<atom10:link>
</atom10:link>
<atom10:link>
</atom10:link>
<item>
<title>
</title>
<guid>
</guid>
<link>
</link>
<description>
</description>
<pubDate>
</pubDate>
<feedburner:origLink>
</feedburner:origLink>
</item>
<item>
<title>
</title>
<guid>
</guid>
<link>
</link>
<description>
</description>
<pubDate>
............
.....
..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2009
Added on Oct 14 2009
2 comments
262 views