I am currently having trouble removing the troublesome attribute from my root xdocument node: xml: base .
My Xdocument currentDoc :
<root xml:base="texthere"> <child/> </root>
I looked at the xml: base documentation here: http://www.w3.org/TR/xmlbase/ .
I am having problems with C # code to get rid of this because this xml: prefix does not have a declaration like other namespace prefixes.
This is what I have that doesn't work:
currentDoc.Root.Attributes().Where(a => a.IsNamespaceDeclaration).Remove();
source share