V
Victor
Hallo again, just another really simple query that has taken me all
morning to attempt to not get going.
This is my invalid xpath expression which is what I have tried to
write but fail.
COMPANY/EMPLOYEE/EMPLOYEEDETAILS/count()
What I want is to count the number of <EMPLOYEEDETAILS> for each
<EMPLOYEE> so that my xpath for employee number 1000 calculates 1,
employee number 1001 calculates 1, and employeenumber 1002 calculates
2 (because there are two <EMPLOYEEDETAILS> for the same employee
number).
All help thank you and for everyone that thought about my problem this
morning too. Here is the sample XML.
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>
<EMPLOYEE>
<EMPLOYEENUMBER uknational="true">
1002
</EMPLOYEENUMBER>
<EMPLOYEEDETAILS>
<EMPLOYEENAME>Mary</EMPLOYEENAME>
<NATIONALINSURANCENUMBER>1234567890<NATIONALINSURANCENUMBER>
</EMPLOYEEDETAILS>
<EMPLOYEEDETAILS>
<EMPLOYEENAME>Joanna</EMPLOYEENAME>
<NATIONALINSURANCENUMBER>4323423423424<NATIONALINSURANCENUMBER>
</EMPLOYEEDETAILS>
</EMPLOYEE>
</COMPANY>
morning to attempt to not get going.
This is my invalid xpath expression which is what I have tried to
write but fail.
COMPANY/EMPLOYEE/EMPLOYEEDETAILS/count()
What I want is to count the number of <EMPLOYEEDETAILS> for each
<EMPLOYEE> so that my xpath for employee number 1000 calculates 1,
employee number 1001 calculates 1, and employeenumber 1002 calculates
2 (because there are two <EMPLOYEEDETAILS> for the same employee
number).
All help thank you and for everyone that thought about my problem this
morning too. Here is the sample XML.
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>
<EMPLOYEE>
<EMPLOYEENUMBER uknational="true">
1002
</EMPLOYEENUMBER>
<EMPLOYEEDETAILS>
<EMPLOYEENAME>Mary</EMPLOYEENAME>
<NATIONALINSURANCENUMBER>1234567890<NATIONALINSURANCENUMBER>
</EMPLOYEEDETAILS>
<EMPLOYEEDETAILS>
<EMPLOYEENAME>Joanna</EMPLOYEENAME>
<NATIONALINSURANCENUMBER>4323423423424<NATIONALINSURANCENUMBER>
</EMPLOYEEDETAILS>
</EMPLOYEE>
</COMPANY>