RSS Reader in 10 lines of code
Bert Freudenberg
bert at impara.de
Tue Oct 4 12:38:16 UTC 2005
Am 04.10.2005 um 11:45 schrieb Tony Garnock-Jones:
> Bert Freudenberg wrote:
>
>> If you have Yaxo installed, try this:
>>
>
> Yikes! The RSS feed generated isn't well-formed XML!
Doh! Last time I tried the squeak foundation feed was well-formed :(
You might try a different feed, though, like http://squeaksource.com/
feed.rss
This is what it looks like, for those who couldn't try:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BertRSS.png
Type: image/png
Size: 13984 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20051004/830984e0/BertRSS.png
-------------- next part --------------
UIManager default
edit: (Text streamContents: [:stream |
(XMLDOMParser parseDocumentFrom: (HTTPClient httpGet:
'http://squeaksource.com/feed.rss'))
tagsNamed: #item do: [:item |
#(title bold author italic pubDate normal
description normal) pairsDo: [:tag :attr |
stream withAttribute: (TextEmphasis perform:
attr) do: [
item tagsNamed: tag do: [:element |
stream nextPutAll: element
contentString; space]].
attr = #normal ifTrue: [stream cr]]]])
label: 'Bert''s Minimal Feed Reader'
- Bert -
More information about the Squeak-dev
mailing list
|