I have this XML file, from which I'd like to count the number of users referenced in it. But they can appear in more than one category, and I'd like these duplicates not to be taken into account.
In the example below, the query should return 3 and not 4. Is there a way in XPath to do so? Users are not sorted at all.
<list>
<group name='QA'>
<user name='name1'>name1@email</user>
<user name='name2'>name2@email</user>
</group>
<group name='DEV'>
<user name='name3'>name3@email</user>
<user name='name2'>name2@email</user>
</group>
</list>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…