How to use XmlElementAttribute for List<T>?
I have a class like this: public class Level { [XmlAttribute] public string Guid { get; set; } } public class LevelList : List<Level> { } public class Test { public LevelList CalLevelList { get; set; } } Using XmlSerializer, I get the output like this: <CalLevelList> <Level Guid="0de98dfb-ce06-433f-aeae-786b6d920aa6"/> <Level Guid="0de98dfb-ce06-433f-aeae-786b6d920aa7"/> </CalLevelList> Which is technically correct. However, without changing the class names, I'd like to make the output look like this: <Levels> <L Guid="0de98dfb-ce06-433f-aeae-786b6d920aa6"/> <L Guid="0de98dfb-ce06-433f-aeae