Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


count in xpath

Posted on 2005-04-04
Medium Priority
Last Modified: 2012-08-14
I am beginner in xpath. a simple question...
How to get the count of persons who have a spouse.

<!-- head comments -->
    <!-- second level comments -->
    <person ssn="s111222333"  gender="F"  luckynumber="6" >   
        <link spouse="s123456789"  children="s123123123 s222333444" ></link>  
    <person ssn="s123123123"  gender="M"  luckynumber="4" >
        <link father="s123456789"  mother="s111222333"  luckynumber="10" ></link>
     <person ssn="s555987323"  gender="M" >
        <link spouse="s887667545"  children="s123456789" ></link>
Question by:sumantedla
1 Comment
LVL 15

Accepted Solution

dualsoul earned 150 total points
ID: 13704375
this one, i guess :  count(/familytree/person[link/@spouse])

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question