Custom Xml Serialization of Unknown Type

前端 未结 3 1512
失恋的感觉
失恋的感觉 2020-12-21 06:19

I\'m attempting to deserialize a custom class via the XmlSerializer and having a few problems, in the fact that I don\'t know the type that I\'m going to be deserializing (i

3条回答
  •  生来不讨喜
    2020-12-21 07:10

    I'd use xpath to quickly figure out whether the input xml contains class A or class B. Then deserialize it based on that.

提交回复
热议问题