[Mono-list] Xml.Serialization empty element
Lluis Sanchez
lluis at ximian.com
Tue Apr 18 03:51:13 EDT 2006
El vie, 14-04-2006 a las 20:17 +0200, Dominik Zablotny escribió:
> Hello
>
> I would like to represent empty XML element as a bool that is true where
> element is present, and false when it's not. Serialized element must be
> empty, so DefaultValue("false") is not sufficient. For now the best way
> I figured out is using extra class for that element and extra bool
> property, but since this situation is quite common in my program I
> wonder if there is a better way to do it?
>
There isn't a better way. XmlSerializer does not have support for what
you want to do.
Lluis.
More information about the Mono-list
mailing list