I sometimes do this:
XElement.Descendants("mynodename");
is there a way to do something like this"
XElement.Descendants("mynodename or myothernodename");
I sometimes do this:
XElement.Descendants("mynodename");
is there a way to do something like this"
XElement.Descendants("mynodename or myothernodename");
Not in one method call - but you can use:
element.Descendants()
.Where(x => x.Name.LocalName == "mynodename"
|| x.Name.LocalName == "myothernodename")
Or,
XElement.Descendants("mynodename")
.Union(XElement.Descendants("myothernodename"));
Which would sort them by type, then in order of appearance...