I have an xml file like this:
<students>
<student name=....>
</student>
<student name=....>
</student>
<student name=....>
</student>
<student name=....>
<failedcourses>
...
</failedcourses>
</student>
<student name=....>
<failedcourses>
...
</failedcourse>
</student>
</students>
I.e. I have a list of students, a portion of which have a subelement , but most of the students don't have this subelement.
I want to get the name of the nth student that has failed a course, how do I do that?
I want an XPath expression that works, I don't care about performance.