Sorting an XML

Hi,
Given an XML file similar to this:


<class>
  <student>
    <last_name>Smith</last_name>
  </student>
  <student>
    <last_name>Jackson</last_name>
  </student>
  <student>
    <last_name>Aaron</last_name>
  </student>
</class>

Is there a way or a function to sort this XML via last name?

Thanks.