This is my sample xml
<markers>
<marker location_id="1" title="test 1" distance="0.0832"/>
<marker location_id="2" title="test 2" distance="3.1852"/>
<marker location_id="3" title="test 3" distance="4.3761"/>
<marker location_id="4" title="test 4" distance="3.3761"/>
</markers>
var entries = xml.documentElement.getElementsByTagName('marker');
How can I sort this entries by distance, ascending order ? I want to do it using Javascript.