var query = from org in xdoc.Descendants("Organization")
from feature in org.Element("Features").Elements()
where feature.Element("[b]Key[/b]") != null && feature.Element("Key").Value == "[b]key2[/b]"
select new
{
Name = org.Element("Name").Value,
Phone = org.Element("Phone").Value,
Key2 = feature.Element("Key").Value,
Val2 = feature.Element("Val").Value
};
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
Open in new window