I read that Nodes() emits all the nodes including sub.
and DescendantNodes() the same but in a recursive way.
however – I cant find any situation in which i will need the recursive way…
When should I prefer working with DescendantNodes() over Nodes() ?
i.e :

IEnumerable<XNode> nodes =from nd in xmlTree.DescendantNodes()
select nd;
foreach (XNode node in nodes)
Console.WriteLine(node);
output :

question :
Why will i need it recursively splitted ,when I can work with Nodes() ?
Imagine you have an XML document you want to process with several levels of nesting, and you want to find all comment nodes at all levels, then you can do:
If you solely used the
Nodesmethod you would need to write a recursive method to find all comment nodes.