[Mono-devel-list] Re: xml-serialization

Miguel de Icaza miguel at ximian.com
Sun Apr 27 02:23:25 EDT 2003

Hello guys!

> There seems two issues using CodeDOM. One is a performance issue,
> as Adam concerned about, and the other is completeness of CodeDOM
> library. MS's xml serialization is considered to create XmlSerializer
> once, and serialize many times using it. Code generation is surely
> very heavy, but it occurs one time. It is reasonable in a sense.
> (I don't know if generated code is faster than other ways in fact...)
> There is certain needs to use CodeDOM, because MS's xsd.exe generates
> classes in C# or VB.NET, but as to serializer-generated assembly
> (derived XmlSerializationReader/Writer), it seems no need, other 
> than security consideration (but I have no concrete idea why it is
> required).

I just wanted to contribute a tiny bit to the discussion (other than
pointing to the Wiki page that contains some information on code
generation (http://www.nullenvoid.com/mono/wiki/index.php/DeveloperFaq)

A tool like "XSD" would certainly have a use for the CodeDOM, as the
output of this tool is tweakable to generate code in a number of

But the serializer itself has no need for this when creating the
temporary code for serialization.  In that case, as Atsushi mentions, it
is best to just use WriteLines.

Not advocating a particular implementation strategy for XmlSerializer
just yet.


More information about the Mono-devel-list mailing list