I am retrieving an element or node from my xml doc. All goes well but when I retrieve the node it gets assigned the namespace of my root. This I don't want. I just want the node as it was before (without namespace).
My element that is retrieve is e.g. xElement. I am tried
xElement.Attributes("xmlns").Remove();
xElement.Attributes("xmlns").Where(x=>x.IsNamespaceDeclaration).Remove();
None of them did the trick.
I even tried this example: https://social.msdn.microsoft.com/Forums/en-US/9e6f77ad-9a7b-46c5-97ed-6ce9b5954e79/how-do-i-remove-a-namespace-from-an-xelement?forum=xmlandnetfx This left met with an element with an empty namespace xmlns=""
Please help.