Here is my XML,
<content id = "C1">
<paragraph >
<Info />
<contentValue>Content1</contentValue>
</paragraph>
<paragraph>
<Info />
<contentValue>Content2</contentValue>
</paragraph>
<content>
<content id = "C2">
<paragraph >
<Info />
<contentValue>Content3</contentValue>
</paragraph>
<paragraph>
<Info />
<contentValue>Content4</contentValue>
</paragraph>
<paragraph>
<Info />
<contentValue>Content5</contentValue>
</paragraph>
<content>
I need to parse through each of <content> tags and fetch the values of <contentvalue> tags and store it in a List.
I'm using following code but, values of <contentvalue> tags are concatinated like 'Content1Content2'
var xdoc = XDocument.Load(path);
var Contents = xdoc.Descendants("content").Select(c => (string)c).ToArray();