开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜