I am trying to find duplicates in my xml data and from that I would like to apply condition.
here is my xml doc
<results>
<book>
<id>1</id> <status> published</status>
</book>
<book>
<id>1</id> <status> not published</status>
</book>
<book>
<id>2</id> <status> sold</status>
</book>
</results>
From the above xml, I want to find book id where id's are repeated and the status is published then return
.
<book> <id>1</id> <status> published</status> </book>
using XQuery .
Could you please help me on this. Thanks in advance.
Best answer by takashi
View original