rem: return Boolean(typeEL.firstChild.nodeValue); 
add: return Boolean(parseInt(typeEL.firstChild.nodeValue)); 
context: rpc.ServiceProxy.prototype.__parseXMLRPC = function(valueEl){	if(valueEl.childNodes.length == 1 &&	   valueEl.childNodes.item(0).nodeType == 3)	{		return valueEl.childNodes.item(0).nodeValue;	}	for(var i = 0; i < valueEl.childNodes.length; i++){		if(valueEl.childNodes.item(i).nodeType == 1){			var typeEL = valueEl.childNodes.item(i);			switch(typeEL.nodeName.toLowerCase()){				case 'i4':				case 'int':					//An integer is a 32-bit signed number. You can include a plus or minus at the					//   beginning of a string of numeric characters. Leading zeros are collapsed.					//   Whitespace is not permitted. Just numeric characters preceeded by a plus or minus.					var intVal = parseInt(typeEL.firstChild.nodeValue);					if(isNaN(intVal))						throw Error("XML-RPC Parse Error: The value provided as an integer '" + typeEL.firstChild.nodeValue + "' is invalid.");					return intVal;				case 'double':					//There is no representation for infinity or negative infinity or "not a number".					//   At this time, only decimal point notation is allowed, a plus or a minus,					//   followed by any number of numeric characters, followed by a period and any					//   number of numeric characters. Whitespace is not allowed. The range of					//   allowable values is implementation-dependent, is not specified.					var floatVal = parseFloat(typeEL.firstChild.nodeValue);					if(isNaN(floatVal))						throw Error("XML-RPC Parse Error: The value provided as a double '" + typeEL.firstChild.nodeValue + "' is invalid.");					return floatVal;				case 'boolean':					if(typeEL.firstChild.nodeValue != '0' && typeEL.firstChild.nodeValue != '1')						throw Error("XML-RPC Parse Error: The value provided as a boolean '" + typeEL.firstChild.nodeValue + "' is invalid.");					return Boolean(typeEL.firstChild.nodeValue);				case 'string':					if(!typeEL.firstChild)						return "";					return typeEL.firstChild.nodeValue;				case 'datetime.iso8601':					var matches, date = new Date(0);					if(matches = typeEL.firstChild.nodeValue.match(/^(?:(\d\d\d\d)-(\d\d)(?:-(\d\d)(?:T(\d\d)(?::(\d\d)(?::(\d\d)(?:\.(\d+))?)?)?)?)?)$/)){						if(matches[1]) date.setUTCFullYear(parseInt(matches[1]));						if(matches[2]) date.setUTCMonth(parseInt(matches[2]-1));						if(matches[3]) date.setUTCDate(parseInt(matches[3]));						if(matches[4]) date.setUTCHours(parseInt(matches[4]));						if(matches[5]) date.setUTCMinutes(parseInt(matches[5]));						if(matches[6]) date.setUTCMilliseconds(parseInt(matches[6]));						return date;					}					throw Error("XML-RPC Parse Error: The provided value does not match ISO8601.");				case 'base64':					throw Error("Not able to parse base64 data yet.");					//return base64_decode(typeEL.firstChild.nodeValue);				case 'nil':					return null;				case 'struct':					//A <struct> contains <member>s and each <member> contains a <name> and a <value>.					var obj = {};					for(var memberEl, j = 0; memberEl = typeEL.childNodes.item(j); j++){						if(memberEl.nodeType == 1 && memberEl.nodeName == 'member'){							var name = '';							valueEl = null;							for(var child, k = 0; child = memberEl.childNodes.item(k); k++){								if(child.nodeType == 1){									if(child.nodeName == 'name')										name = child.firstChild.nodeValue;									else if(child.nodeName == 'value')										valueEl = child;								}							}							//<struct>s can be recursive, any <value> may contain a <struct> or							//   any other type, including an <array>, described below.							if(name && valueEl)								obj[name] = this.__parseXMLRPC(valueEl);						}					}					return obj;				case 'array':					//An <array> contains a single <data> element, which can contain any number of <value>s.					var arr = [];					var dataEl = typeEL.firstChild;					while(dataEl && (dataEl.nodeType != 1 || dataEl.nodeName != 'data'))						dataEl = dataEl.nextSibling;										if(!dataEl)						new Error("XML-RPC Parse Error: Expected 'data' element as sole child element of 'array'.");										valueEl = dataEl.firstChild;					while(valueEl){						if(valueEl.nodeType == 1){							//<arrays>s can be recursive, any value may contain an <array> or							//   any other type, including a <struct>, described above.							if(valueEl.nodeName == 'value')								arr.push(this.__parseXMLRPC(valueEl));							else								throw Error("XML-RPC Parse Error: Illegal element child '" + valueEl.nodeName + "' of an array's 'data' element.");						}						valueEl = valueEl.nextSibling;					}					return arr;				default:					throw Error("XML-RPC Parse Error: Illegal element '" + typeEL.nodeName + "' child of the 'value' element.");			}		}	}	return '';}
meta: 8021	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8021/8073a6b85184d3aade5304de8e573aab353b3a9f/rpc.js/clean/rpc.js