Tuesday, August 18, 2009 at 7:55 PM.

lifeLinerSuite.readRSS

on readRSS () {
	<<Changes
		<<7/25/09; 3:08:07 PM by DW
			<<Created. 
	local (adrdata = lifelinersuite.init (), now = clock.now ());
	if adrdata^.stats.rssUrl != "" {
		local (items, feedinfo);
		on decode (s) {
			return (xml.entitydecode (s, true))};
		new (tabletype, @feedinfo);
		xml.rss.getFeedItems (adrdata^.stats.rssUrl, @items, @feedinfo);
		<<scratchpad.items = items
		new (outlinetype, @adrdata^.outline);
		target.set (@adrdata^.outline);
		window.setsize (@adrdata^.outline, 800, 375);
		<<edit (@adrdata^.outline)
		local (adritem);
		for adritem in @items {
			local (atts);
			op.insert (decode (xml.getvalue (adritem, "description")), up);
			new (tabletype, @atts);
			atts.created = date (xml.getvalue (adritem, "pubDate"));
			try {
				atts.url = xml.getvalue (adritem, "link");
				atts.type = "link"};
			bundle { //get tags
				local (catlist = {});
				for adr in adritem {
					if nameof (adr^) endswith "category" {
						catlist = catlist + decode (adr^)}};
				if sizeof (catlist) > 0 {
					atts.tags = catlist}};
			op.attributes.addgroup (@atts)};
		op.go (down, infinity);
		op.deleteline ();
		lifeLinerSuite.openMyOutline ()}};
bundle { //test code
	readRSS ()}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.