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

system.verbs.builtins.xml.aggregator.unsubscribeService

on unsubscribeService (xmlUrl, adrdata=nil) {
	<<Changes
		<<4/5/02; 9:37:19 PM by DW
			<<Callbacks now take a second parameter, the address of the service table, and (obviously must) run before the table is deleted. Since it's only been two hours since the release of the feature, it seems the breakage possibilities are minimal. Jeremy says he needs access to the service table and it's reasonable to want that. 
		<<4/5/02; 7:53:02 PM by DW
			<<Add support for callbacks.
		<<12/27/01; 1:48:01 PM by PBS
			<<adrdata is a new optional parameter. If nil, get it from xml.aggregator.init.
			<<Pass adrdata to xml.aggregator.clearCache.
	if adrdata == nil {
		adrdata = xml.aggregator.init ()};
	local (adrservices = @adrdata^.services);
	local (adrservice = @adrservices^.[xmlUrl]);
	bundle { //run the callbacks
		try {
			local (adrscript);
			for adrscript in @adrdata^.callbacks.unsubscribeService {
				while typeof (adrscript^) == addresstype {
					adrscript = adrscript^};
				try {adrscript^ (xmlUrl, adrservice)}}}};
	adrdata^.trash.[nameof (adrservice^)] = adrservice^;
	delete (adrservice);
	adrdata^.settings.flSubscriptionsChanged = true;
	xml.aggregator.clearCache (adrdata)}
<<bundle //test code
	<<unsubscribeService ("http://www.nintendorks.com/rss.xml")



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.