Deserialize element value as string although it contains mixed content
问题 Assuming an XML like this: <my:Root xmlns:my="http://foo/bar"> <my:FieldBasic>content</my:FieldBasic> <my:FieldComplex> <html xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml"> <div><h1>content</h1></div> </html> </my:FieldComplex> <my:Root> and a class like: [Serializable] [XmlType(AnonymousType = true, Namespace = "http://foo/bar")] [XmlRoot(ElementName = "Root", Namespace = "http://foo/bar", IsNullable = false)] public class MyRoot { public string FieldBasic { get; set; } public