I need to retrieving the last matching element in xml using xpath. For Eg
<step >
 <step1 name="a">
    <calculation value="123.5">
 </step1>
 <step1 name="b">
    <calculation value="129.5">
 </step1>
<step1 name="a">
    <calculation value="124">
</step1>
<step1 name="c">
    <calculation value="130">
 </step1>
</step>
I want to retrieve the last matching value having name "a" which is 124 here.Can anyone please help.
 
    