I would like to remove all the rows from the root where all the columns are empty.
<root>
<row>
<column></column>
<column></column>
</row>
<row>
<column></column>
<column>data</column>
</row>
<root>
I have tried xDocument.Descendants("row").Elements("column").Where(e => e.IsEmpty || String.IsNullOrWhiteSpace(e.Value)).Remove();
but end up with
<root>
<column>data</column>
<root>
where my desired results are;
<root>
<column></column>
<column>data</column>
</root>