in reply to xml sorting using XML::Twig
$t->parse( \*DATA); [download]
In the XML::Twig docs, sort_children seems to need arguments passed to it.