Sunday, 15 May 2011

asp.net - Remove an extra, unwanted attribute xmlns="" -


Web. While adding a node dynamically in the config file, I'm getting an extra, unwanted feature.
xmlns = ""

How can I solve it?

It depends on how you are generating web.config.

If you are using XML Serialization, then you need to create an XMLSearer namespace and when you do the serialization. XmlSerializerNamespacesNs = New XmlSerializerNamespaces (); Ns.Add ("", ""); XmlSerializer.Serialize (stream, myObject, ns);

If you are editing the code in another way, then there will be a different answer.


No comments:

Post a Comment