I have an XML document that looks something like this:
Both sound and music are derived types from audio base class. They are stored in List sounds collection. How can I deserialize that? Because doing simple (List)x.Deserialize would produce an list of base types.
<file name="SFX_PunchObject.ogg" size="5414"/>
<file name="HWAS_Cutscene1.m4a" size="135049"/>
You can write a custom serializer to deseralize from pretty much any format that contains the necessary information to populate your object..
Normally you can use
on your base class, and can then deserialize multiple types in one list into the base type. I believe that requires having a
attribute, instead of having different root elements, though.
You might have to implement ISerializable to get what you need.