I'm trying to retrieve the most recent "final" record from a list like:
<StatusRecords>
<Status>
<Name>final</Name>
<Date>1/1/2006</Date>
</Status>
<Status>
<Name>final</Name>
<Date>1/1/2010</Date>
</Status>
<Status>
<Name>interim</Name>
<Date>1/1/2005</Date>
</Status>
</StatusRecords>
The data in question is supposed to have only one "final" status entry, and I wrote the code to simply find that one entry. But we've found the actual data is filled with multiple "final"s like this. So I need to get the one with the highest date.
I see that this is possible using Xpath, which is how I handle the parsing already, but I do not understand how to translate this into VB.Net code. Does anyone have a snippet?