I have an XML where I have a name space '_spreadSheetNameSapce'. In my code I have to add a new element with attribute associated with the name the space and I am doing it like the following
XElement customHeading = new XElement("Row", new XAttribute(_spreadSheetNameSapce + "AutoFitHeight", "0"));
It creates the XElement properly but it does insert xmlns="" entry also in the same element. I do not want that element to be created. How can I create the Xelement without the empty name space or how can I remove the namespace after the element is created?
Thanks a lot.