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.
jquery sorting xml
pixeltocode
source share