Link to home
Start Free TrialLog in
Avatar of sumantedla
sumantedla

asked on

count in xpath

Hi,
I am beginner in xpath. a simple question...
How to get the count of persons who have a spouse.

<?version="1.0"?>
<!-- head comments -->
<familytree>
    <!-- second level comments -->
   <meta>Becker</meta>
   
    <person ssn="s111222333"  gender="F"  luckynumber="6" >   
        <first>Valerie</first>
        <last>Becker</last>
        <email>valerie@hotmail.com</email>
        <link spouse="s123456789"  children="s123123123 s222333444" ></link>  
    </person>
    <person ssn="s123123123"  gender="M"  luckynumber="4" >
        <first>Chris</first>
        <last>Becker</last>
        <email>chris@becker.com</email>
        <link father="s123456789"  mother="s111222333"  luckynumber="10" ></link>
    </person>
     <person ssn="s555987323"  gender="M" >
        <first>John</first>
        <last>Becker</last>
        <email>john@becker.com</email>
        <link spouse="s887667545"  children="s123456789" ></link>
    </person>
</familytree>
ASKER CERTIFIED SOLUTION
Avatar of dualsoul
dualsoul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial