I have been trying to use xPath 1.0 to find the value of an ID attribute where the date attribute is the minimum and am having no luck. Can someone help me figure this out?
Example:
<Job id="1" date="12/10/2015"/>
<Job id="2" date="12/05/2015"/>
<Job id="3" date="12/15/2015"/>
I've tried Job[@date = min(Job/@date)][1]/@id
but I am not returning anything on my expression tester I am using. I only return null.
Any help would be appreciated. I'd like to find the ID of the Job with the lowest date.
Correct result would be that my expression returns ID 2.