Remove empty xmlns=“” after Xml Serialization

后端 未结 3 479
渐次进展
渐次进展 2020-12-19 06:27

So I am still asking questions about this topic :-(

So I create an object, decorate it with the Xml Serialization Attributes, from what I have seen I add an empty na

3条回答
  •  一个人的身影
    2020-12-19 06:49

    Have you tried not specifying the namespace in your XmlRoot attribute?

    I.e.:

    [XmlRoot(ElementName = "url")]
    public class SitemapNode
    { 
    ...
    }
    

提交回复
热议问题