> Ahh! Thats interesting!
> 
> I understand what you mean. Since RSS and Atom feeds have
> the same structure
> parsing them would be the same but I can do the for each
> different URLs.
> These URLs can be obtained from a db, a file or through the
> request
> parameters, right?

Exactly. You can register multiple <dataSource with different names. And then 
in each each <entity, you can select appropriate data source with 
dataSource="..." tag.

For a db, data-config.xml would be something like:

<dataSource type="HttpDataSource" name="http"/>
<dataSource type="JdbcDataSource" name="db" driver="com.mysql.jdbc.Driver" 
url="jdbc:mysql://localhost/mydb" batchSize="-1"/>

<entity name="urls" dataSource="db" query="SELECT url FROM urls"> 
<entity name="slashdot" dataSource="http"
                        pk="link"
                        url="${urls.url}"
                        processor="XPathEntityProcessor"
                        forEach="/RDF/channel | /RDF/item"
                        transformer="DateFormatTransformer">

Reply via email to