C# Xml Serialization & Deserialization
问题 I am trying to serialize an object & save it into a Sql server 2008 xml field. I also have some deserialization code that re-hydrates the object. I am able to serialize & save the object into the db, but get a "Root element missing" exception. [XmlRoot("Patient")] public class PatientXml { private AddressXml _address = null; private EmergencyContactXml _emergencyContact = null; private PersonalXml _personal = null; [XmlElement] public PersonalXml Personal { get { return _personal; } set {