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


on s3Echo (xmltext) {
		<<12/27/09; 10:56:55 AM by DW
	local (xstruct);
	xml.compile (xmltext, @xstruct);
	local (adrpackets = xml.getaddress (@xstruct, "packets"));
	local (adrsystem = xml.getaddress (adrpackets, "system"));
	local (serialnum = xml.getvalue (adrsystem, "serialnum"));
	local (comment = "\r\n\r\n<!-- Archived: <%now%> Pacific. Location: <%url%> -->\r\n");
	local (path = "/" + serialnum + ".xml");
	local (t);
	new (tabletype, @t); = ();
	t.url = "http:/" + path;
	comment = string.multiplereplaceall (comment, @t, false, "<%", "%>");
	xmltext = string.replace (xmltext, "?>", "?>" + comment);
	s3.newobject ("/", xmltext, "text/xml");
	s3.newobject (path, xmltext, "text/xml")};
bundle { //test code
	s3echo (scratchpad.cloudpipestring)}

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.