Getting namespaces in XML using jQuery for all browsers

Getting namespaces in XML using jQuery for all browsers

Using jquery 1.5 and part of my XML is this


 

<gd:when endTime='2011-03-03T16:00:00.000-06:00' startTime='2011-03-03T11:00:00.000-06:00'/>



If I use:

  1. $(xml).find('gd\\:when').each(function(){
      alert($(this).attr('startTime'));
     });

It works in Firefox, but not safari
 
If I use:

  1. $(xml).find('[nodeName=gd:when]').each(function(){
      alert($(this).attr('startTime'));
     });


 
It works in Safari but in Firefox I get the error:

uncaught exception: Syntax error, unrecognized expression: [nodeName=gd:when]
I cannot figure out what the deal is either :(