Deserializing XML with DataContractSerializer
问题 I have a web service that returns the following data: <?xml version=""1.0"" encoding=""UTF-8""?> <RESPONSE> <KEY>12345</KEY> <PROPERTY> <PROPERTY_ADDRESS> <STREET_NUM>25</STREET_NUM> <STREET_ADDRESS>ELM ST</STREET_ADDRESS> <STREET_PREFIX/> <STREET_NAME>ELM</STREET_NAME> <STREET_TYPE>ST</STREET_TYPE> <STREET_SUFFIX/> </PROPERTY_ADDRESS> </PROPERTY> </RESPONSE> I have a class structure to match: [DataContract(Name="RESPONSE", Namespace="")] public class Response { [DataMember(Name="KEY")]