XML find and each not finding or "eaching".

XML find and each not finding or "eaching".

Here is my xml output from the php file...
  1. <?xml version="1.0" encoding="utf-8" ?><msgs crid="0"><msg><time>1282858661408571</time><uid>Sub7</uid><text>ds</text></msg><msg><time>1282858673545392</time><uid>Sub7</uid><text>d</text></msg></msgs><users crid="0"></users>
Here is my javascript function. Everything is working normally up to here (checked in firedebugger).
  1. function parseXml(xml)
  2. {
  3.   $(xml).find('msgs').each(function(){
  4.   alert(1);
  5.           var crid = $(this).attr('crid');
  6.           $(this).find('msg').each(function(){
  7.               var time = $(this).find('time').text();
  8.               var userid = $(this).find('uid').text();
  9.               var text = $(this).find('text').text();
  10.               AddChat(userid,text);
  11.           });
  12.       });
  13.       $(xml).find('users').each(function(){
  14.           var crid = $(this).attr('crid');
  15.           $(xml).find('user').each(function(){
  16.               var lastupdate = $(this).find('lastupdate').text();
  17.               var status = $(this).find('status').text();
  18.               var username = $(this).find('username').text();
  19.           });
  20.       });
  21. }
My issue here is that alert(1); never fires... even though msgs exists in the xml and is passed to the jquery find and each function it detects nothing... Can anyone explain this? I have the latest jquery min version.