I am having issue to find out duplicate value of element and remove the node.
XML:
<library>
<books>
<name>Learn XSLT</name>
<id>1</id>
</books>
<books>
<name>Learn Java</name>
<id>3</id>
</books>
<books>
<name>Learn XSLT</name>
<id>2</id>
</books>
</library>
I want to store the duplicate entry that is <name>Learn XSLT</name>
and <id>2</id>
in variable and remove that books node from XML.
I am stuck at how to find those duplicates.
expected output variable containing
<books>
<name>Learn XSLT</name>
<id>2</id>
</books>
output XML
<library>
<books>
<name>Learn XSLT</name>
<id>1</id>
</books>
<books>
<name>Learn Java</name>
<id>3</id>
</books>
</library>