Node with maximum attribute value

Subject: Node with maximum attribute value
From: "Richard Birkby" <rbirkby@xxxxxxxxxxxxxxx>
Date: Mon, 21 Feb 2000 17:50:24 -0000
I have fairly flat XML Structure:
<closing-price date="8/5/1998" mid="203.12" />
<closing-price date="11/5/1998" mid="198.75" />
<closing-price date="12/5/1998" mid="187.5" />
<closing-price date="13/5/1998" mid="194.37" />
and I want to find the maximum mid attribute from the node-set.
My first idea was to use a sorted for-each, and assign a variable to the maximum value, however variables cannot be reassigned. Is there another way?
Current Thread