What will happen during deserialization; if my class don't have property (e.g. Title) but the xml has that element?

Assume I have SuperClass (A) and two SubClasses(B,C) for that Superclass(A).
In runtime how do i determine which object i should pass in the below when i got xml response? Since I don't know what is the RootElement (B or C) of the xml?

XmlSerializer does not utilize/require (or guarantee?) ordering of sibling elements. This is one reason why I like it over DataContractSerializer for "things that might be changed by humans". Also, please, one focused question per post (that is also summarized in the title).
–
user166390Dec 11 '12 at 19:03

You should look into DataContractSerializer, which is more modern and is still actively being developed. XmlSerializer is not.
–
John SaundersDec 11 '12 at 19:44

@JohnSaunders I still believe that DCS is not suitable "things that might be changed by humans" (which is vague phrasing on purpose as one could argue a human editing the XML incorrectly, and doing so little as changing element order, invalidates the data) - DCS makes for simple serialization otherwise.
–
user166390Dec 11 '12 at 20:08

To my knowledge, neither is the XmlSerializer. It serializes and deserializes XML based on a schema. I've never seen it accept elements out of order, for instance.
–
John SaundersDec 11 '12 at 21:12

The solution to your problem is to implement IXmlSerializable interface. This will allow you to control the whole serialization process. Take a look at this codeproject article - it's a very good start

My question no 3 is different from that link. It is dealing with serialisation but my case deserialisation and i dont know which subclass(root Element) i am getting?? Please help.
–
Kanagavelu SugumarDec 11 '12 at 19:36