Apologies if the title is bit confusing, had to keep it concise.
Okay so the xml document looks like this
<students>
<student sid="S2208">
<fname>Ben</fname>
<lname>Doe</lname>
<scourses courseid="DSA" mode="full-time"/>
<scourses courseid="INT" mode="part-time"/>
</student>
<students>
<lecturers>
<lecturer lid="L1101">
<fname>Dohn</fname>
<lname>Joe</lname>
<lcourses courseid="DSA"/>
<lcourses courseid="INT"/>
<lcourses courseid="ACT"/>
</lecturer>
<lecturers>
Using the courseid attribute of scourses in the /students/student is it possible to then retrieve the lid attribute of /lecturers/lecturer by testing whether it exists as an attribute of lcourses? I can only manage to get a 'true' evaluation with the methods I've come up with but not the actual content lid.