Remove an extra, unwanted attribute xmlns=""
While adding a node into web.config file dynamically, I'm getting an extra, unwanted attribute
xmlns="" 开发者_Python百科how can I solve it?
It depends on how you are generating the web.config.
If you are using XmlSerialization you need to create an XmlSerializerNamespace and pass that in when you do the serialization.
XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
ns.Add("", "");
xmlSerializer.Serialize(stream, myObject, ns);
If you are editing the code in another manner there will be a different answer.
精彩评论