tags:

views:

17

answers:

0

Hi, I have an XElement which I am getting after parsing an xml. This XElement needs to be read only when the need arises so, I have stored it in a list for future use. I have to read this XElement using LinQ.

XDocument doc = XDocument.Parse(DataManager.offeringElements[index].DataElem.ToString());

        var docNode = from dataNode in doc.Descendants("DataLinks")
                      select new
                      {
                          Offering = dataNode .Element("link").Value,
                          linkUrl = dataNode.Element("link").Attribue

("href").Value };

the Xelement has the following nodes a. Management b. Analytics c. Development My problem is that I am not able to read all the three nodes.I am able to get only the first node. Where am I going wrong?