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

system.verbs.builtins.soap.decode.unknownSimpleType

on unknownSimpleType (cdata) {
	<<03/26/01; 11:54:16 PM by JES
		<<Created. Decodes an element's character data into a simple type, when the xsi type is not specified in the element.
	<<Changes:
		<<04/10/01; 7:05:30 PM by JES
			<<Decode entities when returning a string.
		<<04/11/01; 7:03:15 PM by JES
			<<Bug fix: Return a decoded integer as a number, instead of as a string.
		<<04/13/01; 5:40:41 PM by JES
			<<Handle "special" float values, NaN, INF, and -INF.
	
	local (value = cdata); //default to the string value
	try { //is it a float or an integer?
		case true {
			value == "NaN";
			value == "INF";
			value == "-INF";
			value contains "." {
				return (soap.decode.float (value))}}
		else {
			return (number (value))}};
	value = xml.entityDecode (value); //decode high ascii
	value = soap.xmlutils.decodeAmpersands (value); //decode standard entities
	return (value)}



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.