Having tried a search with various combinations of ".net deserialize xml one multi-known object type" ... and not finding anything that makes sense, I'm here now.
I get 1 out of 5 unrelated objects (different schemes for each) that can be sent to me, and I need to deserialize this xml into the correct object. And, of course, the number / type of objects will grow ;-) Is there a way for the deserializer to match the xml content for the object, possibly reflection (just guess)? I don't get the outer xml wrapper around the serialized object telling me what it is other than the xml content itself. These are messages coming from different systems, notifying me of an event, status change, new order, ...
I'm thinking of brute force now, the xml reader is looking for an identification attribute that uniquely matches one of my known elements, and then switches from there to deserialization using the appropriate type. It is just not too elegant.
Any guidance, G
source share