First get all PartNumbers
with LINQ to XML
then use Except
method
var list1 = XDocument.Load("firstpath")
.Descendants()
.SelectMany(x => x.Attributes())
.Where(x => x.Name == "PartNumber")
.Select(x => (string)x);
var list2 = XDocument.Load("secondpath")
.Descendants()
.SelectMany(x => x.Attributes())
.Where(x => x.Name == "partnumber")
.Select(x => (string)x);
var result = list1.Except(list2);
According to your file's content result will be empty because there is no PartNumber
that exist in first file but not exist in second.If you want the opposite then use list2.Except(list1)