I am having slight problems using the XPath contains() function. I have to following xml file
<Mod_Spec>
- <Module_Specification>
<Mod_Title>Web Application Development</Mod_Title>
<Mod_Code>COM409J1</Mod_Code>
<Mod_Level>2</Mod_Level>
<Credit_Pts>10</Credit_Pts>
<Semester>1</Semester>
<Mod_Status>Core</Mod_Status>
<Location>Belfast</Location>
<Prerequisite>COM1234</Prerequisite>
<Mod_Coordinator>Mr Bell</Mod_Coordinator>
<Teaching_Staff>Mr Bell</Teaching_Staff>
</Module_Specification>
</Mod_spec>
which consists of multiple Module_Specifications.
I want to return all the Module codes for which the user (session("UserName")) is the module coordinator. I have been trying using the following code, however does not return anything.
set EditList = ObjDOMDoc.selectNodes("Mod_Spec/Module_Specification/Mod_Coordinator[contains(.,'"& Session("UserName") & "')]/Mod_Code")
If I use this code
set EditList = ObjDOMDoc.selectNodes("Mod_Spec/Module_Specification/Mod_Coordinator[contains(.,'"& Session("UserName") & "')]")
it returns all the Module_Coordinator nodes - but this is not what i need.
Does anyone have any ideas???
Thanks in advance
loe