I am working on a project where I'm able to use just jQuery, Javascript and HTML CSS. So, XML response that I copied is below, and I want to sort this XML response on the basis of number of stars given to every location, with the highest number of stars on the top.
<Locations>
<Location>
<Id>790</Id>
<Name>DHA Office</Name>
<Latitude>31.4737</Latitude>
<Longitude>74.3771</Longitude>
<Distance>0.74</Distance>
<Address>Sector Y</Address>
<City>Lahore </City>
<Subcategory>Convenience Store</Subcategory>
<Appid>1</Appid>
<Stars></Stars>
<Options>2,,,,,,,,,,</Options>
</Location>
<Location>
<Id>729</Id>
<Name>McDonald's</Name>
<Latitude>31.4749</Latitude>
<Longitude>74.3772</Longitude>
<Distance>0.67</Distance>
<Address>486/ B</Address>
<City>Lahore </City>
<Subcategory>Convenience Store</Subcategory>
<Appid>1</Appid>
<Stars>5</Stars>
<Options>3,,,,,,,,,,</Options>
</Location>
<Location>
<Id>732</Id>
<Name>Lahore Zoo</Name>
<Latitude>31.5563</Latitude>
<Longitude>74.3261</Longitude>
<Distance>4.79</Distance>
<Address>92 Mall Road</Address>
<City>Lahore </City>
<Subcategory>Convenience Store</Subcategory>
<Appid>1</Appid>
<Stars>3</Stars>
<Options>6,7,,,,,,,,,</Options>
</Location>
</Locations>