Getting multiple data items in an element with linq to xml
- by Maestro1024
Getting multiple data items in an element with linq to xml
I have an xml file like this
<TopLevel>
<Inside>
Jibba
</Inside>
<Inside>
Jabba
</Inside>
</TopLevel>
I was given said xml and and want to get all the elements. Here is the code I have.
var q = from c in loaded.Descendants("TopLevel")
select (XElement)c.Element("Inside");
I tried c.Elements but that did not work. What do I need to do to get all of the internal elements? This code just gets the first "Inside" tag.