using System.Collections.Generic;
public static void Main()
XElement xml = XElement.Parse(XML);
List<string> ids = new List<string> { "111", "222", "333" };
var invoiceIds = p.Elements("Invoice").Elements("Id").Select(o => o.Value);
return ids.Intersect(invoiceIds).Any();
foreach (var item in result)
Console.WriteLine("PaymentId: {0}", (string)item.Element("PaymentId"));