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

system.verbs.builtins.xml.aggregator.visitServices

on visitServices (adrvisit, urlmustcontain=nil) {
	<<Changes
		<<9/11/06; 9:18:48 AM by DW
			<<Created. Loop over all the services in aggregatordata, calling the visit routine. If urlmustcontain is not nil, only visit those whose address contains the substring, case-insensitive.
	local (adrdata = xml.aggregator.init (), lowerurl, adrservice, flvisit);
	if urlmustcontain != nil {
		lowerurl = string.lower (urlmustcontain)};
	for adrservice in @adrdata^.services {
		flvisit = true;
		if urlmustcontain != nil {
			local (urlservice = string.lower (nameof (adrservice^)));
			if not (urlservice contains lowerurl) {
				flvisit = false}};
		if flvisit {
			try {
				adrvisit^ (adrservice)}}}}
<<bundle //test code
	<<local (adrtable = @scratchpad.services)
	<<new (tabletype, adrtable)
	<<on visit (adrservice)
		<<adrtable^.[nameof (adrservice^)] = clock.now ()
	<<visitservices (@visit, "nytimes.com")



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.