. .


Using a SAX Driver: Video

April 13, 2010 10:05:35.263

Today's screencast looks at creating an RSS feed with a Smalltalk SAX driver. If you're looking for a particular topic, you can find it with the Media Search application on our site.

Here's the script I used to create the RSS Feed - it's using the package FeedWriter from the public store), as per the screencast:

"Using a SAX Driver"
stream := ('rss1.xml' asFilename withEncoding: #'UTF-8') writeStream.
writer := RSS20_SAXWriter new output: stream.

"start the document"
writer prolog.
writer startRSS.
writer startChannel.
writer title: 'My RSS Feed'.
writer link: 'http://www.somesite.com'.
writer description: 'My RSS Feed'.

"Now write an item"
writer startItem.
writer title: 'Test Item'.
writer link: 'http://www.somesite.com/item1'.
writer description: 'test item1'.
writer pubDate: Timestamp now.
writer endItem.

"end the document"
writer endChannel.
writer endRSS.
stream close.

You can download the video directly here. If you like this kind of video, why not subscribe to "Smalltalk Daily"?

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This