in reply to Sorting XML elements
You might consider using XSLT to do the sorting using (unsurprisingly) 'xsl:sort' - unfortunately XML::XSLT doesn't support this yet but XML::LibXSLT does.
/J\