public static void Main()
XElement _response = new XElement("response",
new XAttribute("type", "amenities"));
for (int i = 0; i < 10; i++)
_response.Add(new XElement("amenities",
new XAttribute("id", i.ToString()),
new XElement("amenity_id", i.ToString()),
new XElement("amenity", "amenity name" + i),
new XElement("heading", "heading value - " + i),
new XElement("response", "response text - " + i),
new XElement("type", "type - " + i),
new XElement("tab", "tab - " + i)
string[] vvvv = new string[] { "5", "6", "8", "9" };
var _matched = _response.Descendants("amenities").Where(x => vvvv.Contains<string>(x.Element("amenity_id").Value));
foreach (var item in _matched)
Console.WriteLine("VALUE: " + item.Element("response").Value);
Console.WriteLine("--------------------------------------------");
Console.WriteLine(_response.ToString());