how to sort xml data in jQuery
        Posted  
        
            by pixeltocode
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by pixeltocode
        
        
        
        Published on 2010-06-16T11:23:09Z
        Indexed on 
            2010/06/16
            11:32 UTC
        
        
        Read the original article
        Hit count: 286
        
how can i sort all officers based on their ranks
jQuery
$.get('officers.xml', function(grade){
    $(grade).find('officer').each(function(){
        var $rank = $(this).attr('rank');
    });
});
XML (officer.xml)
<grade>
 <officer rank="2"></student>
 <officer rank="3"></student>
 <officer rank="1"></student>
</grade>
thanks.
© Stack Overflow or respective owner