Quantcast
Channel: Use custom specific parsers for differents rss feeds - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Use custom specific parsers for differents rss feeds

$
0
0

I'm using ROME library to read RSS feeds with Java.

I'm in the case where I have multiples RSS feeds (all with 2.0 version) and each feed has its own structure and custom tags. I read in the official documentation that we can specify a custom parser when reading the feeds.

I have implemented a custom parser and specified this parser in a rome.properties and it works fine.

My goal as a next step is to specify a custom parser for each feed I'm reading to avoid having a long and complex parser.

But it appears in the documentation that custom parsers defined in the properties file are more intended to be used for different RSS versions rather than different XML structures.

All the classes defined in this property have to implement the com.rometools.rome.io.WireFeedParser interface. Parser instances must be thread-safe. The return value of the getType() method is used as the primary key. If more than one parser returns the same type, the latter one prevails.

The getType() method here points out to the rss version

I need to know if there is a way (or not) to specify with ROME different custom parsers for different feeds.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images