Monday, November 08, 2010 at 12:07 AM.

system.verbs.builtins.xml.aggregator.bootstrap

on bootstrap (url) {
	<<Changes
		<<11/25/01; 8:51:03 AM by DW
			<<Takes a parameter, the url is no long hard-coded.
			<<Don't create the service table if it's already defined. (Don't want to wipe out stats or history, otherwise the user will get repeats of stories that have already appeared.)
		<<11/8/01; 9:44:25 AM by DW
			<<Created.
			<<The aggregator is being launched for the first time.
			<<Read the virgin services list, and do a scan.
	
	local (adrdata = xml.aggregator.init ());
	
	local (xmltext = tcp.httpReadUrl (url), xstruct);
	xml.compile (xmltext, @xstruct);
	
	local (adropml = xml.getAddress (@xstruct, "opml"));
	local (adrbody = xml.getAddress (adropml, "body"));
	local (outlinelist = xml.getAddressList (adrbody, "outline"));
	local (adr, xmlurl, adrservice);
	for adr in outlineList {
		xmlurl = xml.getAttributeValue (adr, "xmlUrl");
		adrservice = @adrdata^.services.[xmlurl];
		if not defined (adrservice^) {
			new (tabletype, adrservice)}};
	xml.aggregator.readAllServices ()}
<<bundle //test code
	<<bootstrap (radio.data.cloudUrls.aggregatorBootstrap)



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.