[System.Xml] Fix deserialization issue (#16965)
commit9988ebc7f2cf61216d9f27a07074046357440079
authorMaxim Lipnin <v-maxlip@microsoft.com>
Tue, 24 Sep 2019 09:35:15 +0000 (24 12:35 +0300)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 24 Sep 2019 09:35:15 +0000 (24 11:35 +0200)
tree6d8c5e851d73a514f39294ef440fc9128ca868ff
parent7e6d863686af20509f4a0dc7cd4fca351e295347
[System.Xml] Fix deserialization issue (#16965)

[This ](https://github.com/mono/mono/pull/11194/files#diff-ae54d9565e735005686191de0f19ed50R431-R435)change in `XmlTypeMapElementInfo.GetElement`  introduced the logic for handling the case of derived types deserialization.
For some cases (like https://github.com/mono/mono/issues/16918) it breaks existing functionality because it returns wrong element for given element name after searching withing derived types collection.

![image](https://user-images.githubusercontent.com/3258267/65416085-bedc0500-ddff-11e9-941c-f24045c64121.png)

Unfortunately, what I can do here is just reverting the related changes.

Fixes https://github.com/mono/mono/issues/16918
mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs
mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs
mcs/class/System.XML/Test/System.Xml.Serialization/DeserializeTests.cs
mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs
sdks/ios/Makefile