RSS.cfc Update

I've been working on a single CFC to handle RSS work for about 6 months now. (Not straight of course, off and on.) The parsing bit is working quite well I think (with a lot of help from Roger B), but the generating part has been going slowly. I did a bit more work on it today and have got it now generating valid RSS 0.91, RSS 0.92, and RSS 1.0 feeds. It doesn't support all the options available in these feeds, but the idea was to keep it simple. I assume most folks will use it to syndicate simple content. There are no docs - and this is not the 1.0 release (so excuse any guly code), but I thought I'd share what I have so far. The code, and a badly documented example, can be downloaded here.

Comments

Julian's Gravatar Thanks for sharing, Ray. Realise it's work in progress, but there seems to be a typo at line 572: cfhttp.fileContents with an "s".
# Posted By Julian | 5/11/05 5:17 AM
Richard East's Gravatar Also line 571 -
<cfhttp url="#arguments.data#">

The tag needs closing:
<cfhttp url="#arguments.data#" />
# Posted By Richard East | 5/11/05 6:13 AM
Raymond Camden's Gravatar Corrected, although the closing / on cfhttp isn't necessary.
# Posted By Raymond Camden | 5/11/05 9:03 AM
Richard East's Gravatar Thanks as this is not the 1.0 release!

I develop in cfeclipse and without closing the chttp tag it doesn't realise the tag had finished, so it was unable to read all the methods/functions.
# Posted By Richard East | 5/11/05 11:41 AM
Daniel Schmid's Gravatar I checked the generated feed with http://feedvalidator.org
and their seems to be an issue with the dateformat

****validator response****
line 59, column 37: dc:date must be an W3CDTF date (20 occurrences) [help]
<dc:date>2005-05-12T00:00:00+-02:00</dc:date>
**************************

the genrated file is at
http://www.avguide.ch/rss/avguideRSS.xml

also my rss reader mentions invalid dateformat, but I can't figute at what is wrong. Code in RSS.cfc at line 177 seems ok.
# Posted By Daniel Schmid | 5/13/05 5:25 AM
Julian's Gravatar This has already been really useful, Ray. Suggestion for further improvement: a charset optional argument for the cfhttp call would help it deal with non UTF feeds. Thanks again.
# Posted By Julian | 5/17/05 7:32 AM
Henry Rendleman III's Gravatar Hey this looks really good. It actually looks like a couple of functions we are using. I am also using the xmlparse function in Cold Fusion to hack up the rss stuff. Here is a problem that I ran into however. It seems that some people out there have sites that make an xml document and leave some extended ascii characters on the front of the xml contnet. I had to write a function to check it out and make sure that we are only using the standard ascii character set in the beginning and hack off the front characters if they are not standard ascii. I hope this helps you in creating your cfc. Thanks so much for what you guys contribute to this community. If you are interested in this just shoot me an e-mail and i will be happy to help. Thanks a bunch!
# Posted By Henry Rendleman III | 4/20/06 9:00 AM
Tim Adair's Gravatar Hey Ray,

This has been very helpful. How would I limit the amount of characters in the description that are in the output?

Thanks.
# Posted By Tim Adair | 11/1/07 12:32 AM
Raymond Camden's Gravatar You just use the Left() function normally.
# Posted By Raymond Camden | 11/1/07 7:15 AM
Colin's Gravatar is there any option for parsing the [more] as is used in the main blog page? or just trim it from the descriptions...
# Posted By Colin | 4/28/08 2:54 PM
Raymond Camden's Gravatar Colin - I'm not quite sure I get you. This entry is about rss.cfc, a RSS generator. [more] is a convention that BlogCFC uses, a different product.
# Posted By Raymond Camden | 4/28/08 3:03 PM
Colin's Gravatar Ok - I'll dig around for removing the [more] in the creation of the rss from the blogcfc.

Thanks
# Posted By Colin | 4/28/08 3:10 PM
Raymond Camden's Gravatar Did you modify your code? Mine does not do that. I bet you modified it to support a rich text editor which choked on <more>.
# Posted By Raymond Camden | 4/28/08 3:13 PM
Colin's Gravatar must be time for an update to my blogcfc :)
# Posted By Colin | 4/28/08 3:19 PM
Billy's Gravatar The link in your post does not seem to work. http://ray.camdenfamily.com/downloads/rss.zip
# Posted By Billy | 6/26/09 10:49 AM
Raymond Camden's Gravatar Just change it to www.coldfusionjedi.com
# Posted By Raymond Camden | 6/26/09 2:53 PM