[Serializable()] public class A { [XmlArrayAttribute("Item")] public List<B> items; } [Serializable()] [XmlType(TypeName = "Item")] public class B { } After serialization, I found I have something like
<Item> <Item> **** </Item> <Item> **** </Item> ***** </item> But I only want
<Item> **** </Item> <Item> **** </Item> How to get it?