, , XML- LINQ to XML: xmlns Name s. , :
doc.Descendants()
.Attributes()
.Where( x => x.IsNamespaceDeclaration )
.Remove();
foreach (var elem in doc.Descendants())
elem.Name = elem.Name.LocalName;
( .)
, , Name :
foreach (var attr in doc.Descendants().Attributes())
{
var elem = attr.Parent;
attr.Remove();
elem.Add(new XAttribute(attr.Name.LocalName, attr.Value));
}