IE7 xml .attr不起作用

Hi I wonder is someone could please help, i'm working on a project and it works fine in IE8 and upwards, firefox, chrome etc but IE7 is causing major problems. The code below in particular is problematic.

$(xml).find('Data').each(function () {
      //alert($(this).attr('Passret').val());

        if ($(this).attr('Passret') === 'yespass') {

//do something
}

IE7 isn't recongising the if statement because .attr appears to be undefind. Any suggestions?

Here's an example of the xml

<Data Passret="yespass" Custref="32"><Query>0.0020s</Query></Data>

Kind regards Rachel