I have a XML file
<rows>
<head>
<beforeInit>
<call command="attachHeader">
<param>#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter</param>
</call>
</beforeInit>
<afterInit>
<call command="enablePaging">
<param>recinfoArea</param>
</call>
</afterInit>
<column width="100" align="center" type="ro" sort="server" color="undefined" id="Id">Id</column>
<column width="100" align="center" type="ro" sort="server" color="undefined" id="NazovProjektu">NazovProjektu</column>
</head>
</rows>
I'd like to remove the beforeInit and afterInit elements.
I tried
xml.Elements().Where(e=>e.Name == "beforeInit" || e.Name == "afterInit").Remove();
but no luck.