Sorting xml with simpleXML/xpath?
Posted: Tue Jul 20, 2010 12:38 pm
Hey,
I have some xml, say:
How can I sort the xml from lowest Uses to highest?
Maybe an xpath expression?
Also, how could I just retrieve the bottom 2 Backgrounds, or the ones most recently added?
Thanks
I have some xml, say:
Code: Select all
<Background>
<Uses>14</Uses>
</Background>
<Background>
<Uses>19</Uses>
</Background>
<Background>
<Uses>3</Uses>
</Background>
Maybe an xpath expression?
Also, how could I just retrieve the bottom 2 Backgrounds, or the ones most recently added?
Thanks