using System.Collections.Generic;
using System.Globalization;
public static void Main()
string input = @"<People>
<Person name=""Andrew"" />
XDocument doc = XDocument.Parse(input);
var isJohnHere = doc.Element("People")
.Any(x=> x.Attribute("name").Value == "John");
var names = doc.Element("People")
.Select(x=> x.Attribute("name").Value);