I'm using XML Serialization to try and get this structure:
<LibraryCategories>
<LibraryCatgeory>1</LibraryCatgeory>
<LibraryCatgeory>2</LibraryCatgeory>
<LibraryCatgeory>3</LibraryCatgeory>
</LibraryCategories>
My class has a public property called LibraryCategories, of type ArrayList:
[XmlElement(Type = typeof(LibraryCategoryItem))]
public ArrayList LibraryCategories;
In addition, I have class which defines the LibraryCategory item:
public class LibraryCategoryItem
{
public string LibraryCategory;
}
The problem is, the Serialized XML takes this structure
<LibraryCategories>
<LibraryCatgeory>1</LibraryCatgeory>
</LibraryCategories>
<LibraryCategories>
<LibraryCatgeory>2</LibraryCatgeory>
</LibraryCategories>
<LibraryCategories>
<LibraryCatgeory>3</LibraryCatgeory>
</LibraryCategories>
What attributes do I need to place on the LibraryCategories and/or the
LibraryCategoryItem class to enforce the desired XML?