filtering a List on an attribute value

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Assume I have a variable named List<XElement> trial. The XElements have an attribute named "tokeep". Some of these "tokeep" nodes have a value of "*" and the others have a blank value for the "tokeep" attribute.
Using Linq, is there a way to filter trial to retain only those XElements which have a "*" in the "tokeep" attribute node?

View the full article
 
Back
Top