Sequential XML filtering?

Sequential XML filtering?

Hey all,

I'm trying to sort XML data by attributes on separate lines of code, because I'm going to be inserting some if statements and more logic to the sorting (that's why I'm not just checking for all the attributes on one line). However, my code just returns empty, even though I know my XML is valid, there are items that meet the criteria, etc. Here is the snippet of code I'm struggling with:

Feel free to look at the code in action here:  http://ajaxtest.walletwallets.com/ajax10.php

Thanks for any help!

  1. $.get('wallets.xml', function(data) { $('#content').empty(); var $genders = $(data).find('wallet[gender=' + genderChosen + ']'); $genders.find('wallet[material="leather"]').each(function() { var $wallet = $(this); printWallet($wallet); }); }); }