Reordering XML Elements in php, with jquery?

How to use PHP with something like jQuery to update an xml file based on reordering of html table rows or list items?

Here it describes a function to Rearrange/Reorder Elements:

Can they be combined to reorder a longer list of elements?

I’m trying to avoid using mySQL, just php/jquery/xml…