Hi

Just apply the XmlElementAttribute to the array member. This will instruct
the XmlSerializer to serialize the array items as child nodes of the class.

- Lluis

----- Original Message ----- 
From: "Robert Caskey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 28, 2003 5:14 PM
Subject: [Mono-list] XML Serialization Troubles


> I'v got a class I am Serializing that contains an Array of
> objects, and the resulting xml looks more or less like so:
>
> <Doc>
>     <WidgetList>
>         <Widget />
>         <Widget />
>     </WidgetList>
> </Doc>
>
> when what I really want is:
> <Doc>
>     <Widget />
>     <Widget />
> </Doc>
>
> I have found the tags needed to ignore the outer tags all
> together, but then as one might expect, it doesn't process
> the stuff on the inside. Any help would be much appreciated.
>
> Sincerely,
> Rob J. Caskey
> _______________________________________________
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
>

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to