	 $.text2xml = function(sXML) { 
        // NOTE: I'd like to use jQuery for this, but jQuery makes all tags uppercase 
        //return $(xml)[0]; 
        var out; 
        try { 
            var dXML = ($.browser.msie) ? new ActiveXObject("Microsoft.XMLDOM") : new DOMParser(); 
            dXML.async = false; 
        } catch(e) { 
            throw new Error("XML Parser could not be instantiated"); 
        }; 

        try{ 
            if ($.browser.msie) {
                out = (dXML.loadXML(sXML))?dXML:false; 
            } else {
                out = dXML.parseFromString(sXML, "text/xml"); 
            }
        } catch(e) { 
            throw new Error("Error parsing XML string"); 
        }; 

        return out; 
    };
    
    
    
	function getElemText(node){
 		return node.text || node.textContent || (function(node){
 			var _result = "";
 			if (node == null) {
 				return _result;
 			}
 			
			var childrens = node.childNodes;
			var i = 0;
			while (i < childrens.length) {
				var child = childrens.item(i);
				switch (child.nodeType) {
					case 1: // ELEMENT_NODE
					case 5: // ENTITY_REFERENCE_NODE
					_result += arguments.callee(child);
					break;
					
					case 3: // TEXT_NODE
					case 2: // ATTRIBUTE_NODE
					case 4: // CDATA_SECTION_NODE
					_result += child.nodeValue;
					break;
					
					case 6: // ENTITY_NODE
					case 7: // PROCESSING_INSTRUCTION_NODE
					case 8: // COMMENT_NODE
					case 9: // DOCUMENT_NODE
					case 10: // DOCUMENT_TYPE_NODE
					case 11: // DOCUMENT_FRAGMENT_NODE
					case 12: // NOTATION_NODE
					// skip
					break;
				}
	 			
	 			i++;
	 		}
	 		
	 		return _result;
	 	}(node));
	}