How to get first level of children by LINQ
Just document.Root.Elements()
should work.
Basically Descendants()
recurses, whereas Elements()
only gets direct children.
Just document.Root.Elements()
should work.
Basically Descendants()
recurses, whereas Elements()
only gets direct children.