XElement root2 = XElement.Parse(xmlString); IEnumerable tests = from el in root2.Elements("Root") where (string)el.Element("elementName") == "searchPattern" select el.Element("pickElement"); string cc= tests.Single().Value;