string xml = @"<?xml version=""1.0"" encoding=""utf-8"" ?>
<TOP>
<SUB1 name=""AB"">
<SUB11 name=""CD"">
<SUB111>
<KV>
<key>KEY1</key>
<value>1234</value>
</KV>
<KV>
<key>KEY1</key>
<value>5678</value>
</KV>
</SUB111>
</SUB11>
<SUB11 name=""CD"">
<SUB111>
<KV>
<key>KEY1</key>
<value>1357</value>
</KV>
<KV>
<key>KEY2</key>
<value>2468</value>
</KV>
</SUB111>
</SUB11>
</SUB1>
</TOP>";
XDocument doc = XDocument.Parse(xml);
var items = doc.Root.Descendants("SUB111")
.SelectMany(s=>s.Descendants("KV")
.GroupBy(x=>(string)x.Element("key"))
.Select(g=>g.First()))
.ToList();
You may need to add your where conditions but most important thing is you can group by key value and select the first item of the group, that will remove the duplicates.