Maintaining xml hierarchy (ie parent-child) information in objects generated by XmlSerializer

前端 未结 2 485
长情又很酷
长情又很酷 2021-01-25 07:37

for some time now I have been trying to solve the following problem and I\'m starting to run out of ideas:

I have generated a set of C# classes from an xsd schema using

相关标签:
2条回答
  • 2021-01-25 07:48

    I wrote an article some time ago about this exact problem, perhaps it can help you.

    http://www.thomaslevesque.com/2009/06/12/c-parentchild-relationship-and-xml-serialization/

    0 讨论(0)
  • 2021-01-25 07:49

    XmlSerializer should maintain simple object hierarchies for serialization and deserialization. Complex things such as arrays or lists containing more than one type of object are a bit tricker. . . but possible.

    0 讨论(0)
提交回复
热议问题