how to derive xml element name from an attribute value of a class using annotations?

Update And here’s a quick adaptation to handle your Property class. First, a List<T> subclass that implements IXmlSerializable: public interface IHasElementName { string ElementName { get; set; } } public class XmlNamedElementList<T> : List<T>, IXmlSerializable where T : IHasXmlElementName { // https://msdn.microsoft.com/en-us/library/System.Xml.Serialization.XmlSerializer%28v=vs.110%29.aspx // Any serializer created with the “XmlSerializer(typeof(T), rootAttribute)” must be cached // to … Read more