как мне отсортировать все officers
на основе их ranks
jQuery
$.get('officers.xml', function(grade){
$(grade).find('officer').each(function(){
var $rank = $(this).attr('rank');
});
});
XML (employee.xml)
<grade>
<officer rank="2"></student>
<officer rank="3"></student>
<officer rank="1"></student>
</grade>
спасибо.