So, I have an xml that has a similar structure to this:
<MyObject> <PropertyA>Value</PropertyA> <PropertyB>Value</PropertyB> <PropertyC>Value</PropertyC> <ArrayOfOtherObject> <OtherObject> <PropertyX>Value</PropertyX> <PropertyY>Value</PropertyY> <PropertyZ>Value</PropertyZ> </OtherObject> <OtherObject> <PropertyX>Value</PropertyX> <PropertyY>Value</PropertyY> <PropertyZ>Value</PropertyZ> </OtherObject> <OtherObject> <PropertyX>Value</PropertyX> <PropertyY>Value</PropertyY> <PropertyZ>Value</PropertyZ> </OtherObject> </ArrayOfOtherObject> </MyObject>
Is there a way to deserialize MyObject but not ArrayOfOtherObject? And then do lazy loading of ArrayOfOtherObject later if necessary?
I usually use XmlDeserialization, but AFAIK always loads it all.
Thanks!
c # serialization
Carlo
source share