Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.upstream.builtinDrivers.xmlStorageSystem.saveUpstreamSpec
on saveUpstreamSpec (f, usernum, name, passwordName="default", protocol=user.radio.prefs.defaultCloud.protocol, server=user.radio.prefs.defaultCloud.server, port=user.radio.prefs.defaultCloud.port, rpcPath=user.radio.prefs.defaultCloud.rpcPath, soapAction=user.radio.prefs.defaultCloud.soapAction) { <<Changes <<12/20/01; 1:19:47 AM by JES <<Use file.writeTextFile instead of file.writeWholeFile to write the file. <<11/20/01; 3:45:58 AM by JES <<Changed default value of passwordName to "default" from "defaultXssPassword". <<10/22/01; 11:00:33 PM by JES <<Rewrite: Save with elements in a sensible order by function, instead of alphabetically. Changed <account> to <usernum>. Get default values from user.radio.prefs.defaultCloud. local (xmltext, indentlevel=0); on add (s) { xmltext = xmltext + string.filledString ("\t", indentlevel) + s + "\r\n"}; add ("<upstream type=\"xmlStorageSystem\" version=\"1.0\">"); indentlevel++; add ("<usernum>" + usernum + "</usernum>"); add ("<name>" + name + "</name>"); add ("<passwordName>" + passwordName + "</passwordName>"); <<Items which have default values add ("<server>" + server + "</server>"); add ("<port>" + string (port) + "</port>"); add ("<protocol>" + string.lower (protocol) + "</protocol>"); add ("<rpcPath>" + rpcPath + "</rpcPath>"); add ("<soapAction>" + soapAction + "</soapAction>"); add ("</upstream>"); indentlevel--; file.writeTextFile (f, xmltext); return (true)}
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.