Jaxb equivalent in C#

后端 未结 3 904
孤独总比滥情好
孤独总比滥情好 2020-12-05 14:47

Using JAXB in Java it is easy to generate from a xml schema file a set of Java classes that xml conforming to that schema can be deserialized to.

Is there some C# eq

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-05 15:43

    Look into using DataSet. It's a bit of a different concept from using "Java Beans". The entire XML document is treated hierarchical set of tables all in a single class. The good part is that theory of encapsulation for OOP is actually enforced. Wow, Microsoft got something right that Sun pooched.

    Anyway. You can also look at typed DataSet's if you want make things more interesting. I've used this on major projects with great success.

提交回复
热议问题