c# - How do I find all XML elements whose value is in a list of values using LINQ -



c# - How do I find all XML elements whose value is in a list of values using LINQ -

i need able find xml elements values can found in list of values grouping of xml elements. in other words homecoming of elements grouping value matches of elements grouping b. need accomplish using linq xml.

here's code. returns null. how prepare it?

ienumerable<xelement> myelements = e in groupa.elements("element") groupb.elements("element").tolist().contains(e) select e;

i think want

ienumerable<xelement> myelements = e in groupa.elements("element") groupb.elements("element").any(b => b.value == e.value) select e;

c# .net linq-to-xml

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -