I am trying to find the duplicate country in the following xml
<Forms>
<Form_1>
<Country>AFG</Country>
<Country>AFG</Country>
<Country>IND</Country>
</Form_1>
<Form_1>
<Country>IND</Country>
<Country>USA</Country>
</Form_1>
</Forms>
Using this XPath expression
Forms//Form_1/Country[.=./following::Country]
It does give me the duplicate countries as AFG and IND but I want to find the duplicate countries within the scope of the parent Form_1 and not the whole document.
So for the above XML, my expected outcome is only AFG because it is duplicate within the one parent.
What should be adjustment that I should make to the xpath to get this desired result?