V
Victor
Hallo, I am hitting my head against a brick wall and can't formulate a
simple XPATH query. If someone could help I would be most
appreciative.
This xpath "COMPANY/EMPLOYEE/EMPLOYEENUMBER/text()" returns 1000 and
1001
This xpath "COMPANY/EMPLOYEE/EMPLOYEEDETAILS/EMPLOYEENAME/text()"
returns Mary and Victor
This xpath "COMPANY/EMPLOYEE/EMPLOYEENUMBER[@uknational="true"]/text()"
returns 1000
I can't work out the syntax to combine them and return only the
employee names (not employee numbers) where uknational="true", ie a
xpath query that returns
COMPANY/EMPLOYEE/EMPLOYEEDETAILS/EMPLOYEENAME/text() where
uknational="true"
All help appreciated and thank you in advance.
Victor
<COMPANY>
<EMPLOYEE>
<EMPLOYEENUMBER uknational="true">
1000
</EMPLOYEENUMBER>
<EMPLOYEEDETAILS>
<EMPLOYEENAME>Mary</EMPLOYEENAME>
<NATIONALINSURANCENUMBER>1234567890<NATIONALINSURANCENUMBER>
</EMPLOYEEDETAILS>
</EMPLOYEE>
<EMPLOYEE>
<EMPLOYEENUMBER uknational="false">
1001
</EMPLOYEENUMBER>
<EMPLOYEEDETAILS>
<EMPLOYEENAME>Victor</EMPLOYEENAME>
<EMPLOYEENATIONALINSURANCENUMBER/>
</EMPLOYEEDETAILS>
</EMPLOYEE>
</COMPANY>
simple XPATH query. If someone could help I would be most
appreciative.
This xpath "COMPANY/EMPLOYEE/EMPLOYEENUMBER/text()" returns 1000 and
1001
This xpath "COMPANY/EMPLOYEE/EMPLOYEEDETAILS/EMPLOYEENAME/text()"
returns Mary and Victor
This xpath "COMPANY/EMPLOYEE/EMPLOYEENUMBER[@uknational="true"]/text()"
returns 1000
I can't work out the syntax to combine them and return only the
employee names (not employee numbers) where uknational="true", ie a
xpath query that returns
COMPANY/EMPLOYEE/EMPLOYEEDETAILS/EMPLOYEENAME/text() where
uknational="true"
All help appreciated and thank you in advance.
Victor
<COMPANY>
<EMPLOYEE>
<EMPLOYEENUMBER uknational="true">
1000
</EMPLOYEENUMBER>
<EMPLOYEEDETAILS>
<EMPLOYEENAME>Mary</EMPLOYEENAME>
<NATIONALINSURANCENUMBER>1234567890<NATIONALINSURANCENUMBER>
</EMPLOYEEDETAILS>
</EMPLOYEE>
<EMPLOYEE>
<EMPLOYEENUMBER uknational="false">
1001
</EMPLOYEENUMBER>
<EMPLOYEEDETAILS>
<EMPLOYEENAME>Victor</EMPLOYEENAME>
<EMPLOYEENATIONALINSURANCENUMBER/>
</EMPLOYEEDETAILS>
</EMPLOYEE>
</COMPANY>