RSS Reader in 10 lines of code
Bert Freudenberg
bert at impara.de
Mon Oct 3 19:41:20 UTC 2005
Am 02.10.2005 um 18:21 schrieb Giovanni Corriga:
> So if you have any snippets of code that you'd like to share with the
> other squeaker, please send them to me for publication.
If you have Yaxo installed, try this:
UIManager default
edit: (Text streamContents: [:stream |
(XMLDOMParser parseDocumentFrom: (HTTPClient httpGet:
'source.squeakfoundation.org/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
|