How do I deserialize XML namespaces in C# (System.Xml.Serialization)?

后端 未结 2 782
鱼传尺愫
鱼传尺愫 2021-01-13 06:43

I am just putting the finishing touches to my Zthes format deserializer (System.Xml.Serialization) which uses the namespace \"dc\" in the element \"thes\". All \"term\" elem

2条回答
  •  我在风中等你
    2021-01-13 06:48

    [XmlElement("someElement", Namespace="namespace")]
    public string SomeElement;
    

    Addendum: Make sure "namespace" is the full URI of the namespace, not just the prefix.

提交回复
热议问题