I need Xml that looks like this
<foo>
<bar ... />
<bar ... />
</foo>
And currently have the following class structure :
[XmlRoot("foo")]
public class Foo
{
[XmlArrayItem("bar")]
public List<Bar> myBars;
}
But this gives me Xml where bar items are wrapped inside a bars element. How should I define my custom XmlAttributes so I'd get the Xml structure I need?