I have just posted a new plugin for ColdBox called rssGenerator. You can download the plugin pack from the code depot. This plugin is based on the idea of coldfusion 8's cffeed but for any CFMX engine. It will take a standardized structure and convert it into an RSS 2.0 feed. Also, since cffeed offers a capability called column mapper, then so does this plugin. You can pass an optional structure that maps your query's columns to the feed's standard names. That way, you can aggregate any query by just mapping its columns to the feed. Soooo easy!!
In most cases, a database table uses column names that differ from the column names you must use to create the feed. Therefore, you must use the columnmap attribute to map the input query column names to the required column names.
SELECT * FROM orders
Is that cool or what? You can also have a third argument which is a file location. If this location is sent, the plugin will save the generated feed xml into that file and still return to you the feed xml. How easy would this be?
That's it! Again, to download this plugin go to the ColdBox code depot section of the wiki.
Add Your Comment