How to get first level of children by LINQ How to get first level of children by LINQ xml xml

How to get first level of children by LINQ


Just document.Root.Elements() should work.

Basically Descendants() recurses, whereas Elements() only gets direct children.