G
Guest
Hi,
I have a collection class called Printers that implement the ICollection and
IEnumerable. This class contains a private ArrayList that holds the Printer
objects. The printer class is a serializable class that contains only the
public name attribute.
After serialization, I want to get the following xml structure;
<Printers>
<Printer>
<Name></Name>
</Printer>
<Printers>
When I want to serialize this Printers collection, I get instead something
like;
<ArrayOfPrinter>
<Printer>
<Name></Name>
</Printer>
</ArrayOfPrinter>
If I take out the ICollection and IEnumerable away, (turning the class into
a normal one) and make the ArrayList public, then I get the following;
<Printers>
<NameOfMyArrayList>
<Printer>
<Name></Name>
</Printer>
</NameOfMyArrayList>
</Printers>
For clarity, I don't include any code at the moment.
Any help appreciated,
Ethem
I have a collection class called Printers that implement the ICollection and
IEnumerable. This class contains a private ArrayList that holds the Printer
objects. The printer class is a serializable class that contains only the
public name attribute.
After serialization, I want to get the following xml structure;
<Printers>
<Printer>
<Name></Name>
</Printer>
<Printers>
When I want to serialize this Printers collection, I get instead something
like;
<ArrayOfPrinter>
<Printer>
<Name></Name>
</Printer>
</ArrayOfPrinter>
If I take out the ICollection and IEnumerable away, (turning the class into
a normal one) and make the ArrayList public, then I get the following;
<Printers>
<NameOfMyArrayList>
<Printer>
<Name></Name>
</Printer>
</NameOfMyArrayList>
</Printers>
For clarity, I don't include any code at the moment.
Any help appreciated,
Ethem