Basically, I have some xml I need to deserialize. At the time I write my code, I’ll know the structure of the XML, but I’d like to be able to make simple changes to the xml without having to update the serialization code.
Example:
<foo>
<bar/>
</foo>
I’d like to be able to deserialize foo, even if i add an additional node which is not defined in the attibuted serializable class.
<foo>
<bar/>
<extra-tag/>
</foo>
If I understand your question correctly this should work fine.
Given a class:
Then this code works fine:
But if your class looks like this:
the code continues to work