.text() method in jQuery not working for xml element for some reason
I have the following javascript:

    function getMessageFromXML(xml) {
    	alert('xml: ' + xml);
    	alert("Text of message: " + $(xml).find('dataModelResponse').find('message').text());
    	return $(xml).find('dataModelResponse').find('message').text();
    }

which is being executed on the following XML:

    <dataModelResponse>
      <adminMessage>BARF</adminMessage>
      <adminData>
        <identifier>123456</identifier>
      </adminData>
    </dataModelResponse>

I know that the XML is correctly passed in, because of the first alert, but the message is showing up as blank for some reason. I verified that there were exactly 1 message and 1 dataModelResponse elements in the xml, using the .length modifier for similar find() queries, but for some reason, I can't get it to print out the correct message. 

Suggestions? 

.text() method in jQuery not working for xml element for some reason
===

I have the following javascript:

    function getMessageFromXML(xml) {
    	alert('xml: ' + xml);
    	alert("Text of message: " + $(xml).find('dataModelResponse').find('message').text());
    	return $(xml).find('dataModelResponse').find('message').text();
    }

which is being executed on the following XML:

    <dataModelResponse>
      <adminMessage>BARF</adminMessage>
      <adminData>
        <identifier>123456</identifier>
      </adminData>
    </dataModelResponse>

I know that the XML is correctly passed in, because of the first alert, but the message is showing up as blank for some reason. I verified that there were exactly 1 message and 1 dataModelResponse elements in the xml, using the .length modifier for similar find() queries, but for some reason, I can't get it to print out the correct message. 

Suggestions? 
