title: how to sort an xml returned from webservice
body: <p>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.</p>
  
  <pre><code>&lt;Locations&gt;
    &lt;Location&gt;
      &lt;Id&gt;790&lt;/Id&gt;
      &lt;Name&gt;DHA Office&lt;/Name&gt;
      &lt;Latitude&gt;31.4737&lt;/Latitude&gt;
      &lt;Longitude&gt;74.3771&lt;/Longitude&gt;
      &lt;Distance&gt;0.74&lt;/Distance&gt;
      &lt;Address&gt;Sector Y&lt;/Address&gt;
      &lt;City&gt;Lahore &lt;/City&gt;
      &lt;Subcategory&gt;Convenience Store&lt;/Subcategory&gt;
      &lt;Appid&gt;1&lt;/Appid&gt;
      &lt;Stars&gt;&lt;/Stars&gt;
      &lt;Options&gt;2,,,,,,,,,,&lt;/Options&gt;
    &lt;/Location&gt;
    &lt;Location&gt;
      &lt;Id&gt;729&lt;/Id&gt;
      &lt;Name&gt;McDonald's&lt;/Name&gt;
      &lt;Latitude&gt;31.4749&lt;/Latitude&gt;
      &lt;Longitude&gt;74.3772&lt;/Longitude&gt;
      &lt;Distance&gt;0.67&lt;/Distance&gt;
      &lt;Address&gt;486/ B&lt;/Address&gt;
      &lt;City&gt;Lahore &lt;/City&gt;
      &lt;Subcategory&gt;Convenience Store&lt;/Subcategory&gt;
      &lt;Appid&gt;1&lt;/Appid&gt;
      &lt;Stars&gt;5&lt;/Stars&gt;
      &lt;Options&gt;3,,,,,,,,,,&lt;/Options&gt;
    &lt;/Location&gt;
    &lt;Location&gt;
      &lt;Id&gt;732&lt;/Id&gt;
      &lt;Name&gt;Lahore Zoo&lt;/Name&gt;
      &lt;Latitude&gt;31.5563&lt;/Latitude&gt;
      &lt;Longitude&gt;74.3261&lt;/Longitude&gt;
      &lt;Distance&gt;4.79&lt;/Distance&gt;
      &lt;Address&gt;92 Mall Road&lt;/Address&gt;
      &lt;City&gt;Lahore &lt;/City&gt;
      &lt;Subcategory&gt;Convenience Store&lt;/Subcategory&gt;
      &lt;Appid&gt;1&lt;/Appid&gt;
      &lt;Stars&gt;3&lt;/Stars&gt;
      &lt;Options&gt;6,7,,,,,,,,,&lt;/Options&gt;
    &lt;/Location&gt;
  &lt;/Locations&gt;
  </code></pre>