rem: if(xhr.responseXML){ var response = {}; var doc = xhr.responseXML.documentElement; if(doc.nodeName != 'methodResponse') throw Error("Invalid XML-RPC document.");  var valueEl = doc.getElementsByTagName('value')[0]; if(valueEl.parentNode.nodeName == 'param' && valueEl.parentNode.parentNode.nodeName == 'params') { response.result = this.parseXMLRPC(valueEl); } else if(valueEl.parentNode.nodeName == 'fault'){ var fault = this.parseXMLRPC(valueEl); response.error = { code: fault.faultCode, message: fault.faultString }; } else throw Error("Invalid XML-RPC document.");  if(!response.result && !response.error) throw Error("Malformed XML-RPC methodResponse document.");  response.id = requestInfo.id; instance.doCallback(response); 
add: if(instance.__protocol == 'XML-RPC'){ var response = instance.__getXMLRPCResponse(xhr, requestInfo.id); instance.__doCallback(response); 
context: 				xhr.onreadystatechange = function(){					//QUESTION: Why can't I use this.readyState?					if(xhr.readyState == 4){						//XML-RPC						if(xhr.responseXML){							var response = {};							var doc = xhr.responseXML.documentElement;							if(doc.nodeName != 'methodResponse')								throw Error("Invalid XML-RPC document.");														var valueEl = doc.getElementsByTagName('value')[0];							if(valueEl.parentNode.nodeName == 'param' &&							   valueEl.parentNode.parentNode.nodeName == 'params')							{								response.result = this.parseXMLRPC(valueEl);							}							else if(valueEl.parentNode.nodeName == 'fault'){								var fault = this.parseXMLRPC(valueEl);								response.error = {									code: fault.faultCode,									message: fault.faultString								};							}							else throw Error("Invalid XML-RPC document.");														if(!response.result && !response.error)								throw Error("Malformed XML-RPC methodResponse document.");														response.id = requestInfo.id; //XML-RPC cannot pass and return request IDs							instance.doCallback(response);						}						//JSON-RPC						else							instance.doCallback(this.evalJSON(xhr.responseText, this.isResponseSanitized));					}				};
meta: 8021	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8021/8583684aeb41bb178925a8dc54888426e5620b6b/rpc.js/buggy/rpc.js