[Mono-list] Recursive XML serialization? XML serialization of cyclic objects?
rodolfo.campero at gmail.com
Sat Jan 13 09:15:15 EST 2007
2007/1/13, "Andrés G. Aragoneses [ knocte ]" <knocte at gmail.com>:
> implement custom serialization for each of my classes. In fact, what I
> want to be able to do is to XMLserialize my cyclic objects without
> writing more code.
If the only thing you need is to serialize cyclic objects to XML, you
can consider the following. Even though the solution I'll propose is
not currently available, I think it's possible to get there relatively
The XMI  standard, proposed by the OMG , allows XML
serialization of objects with cyclic references. The nUML project 
provides a library with services for XMI serialization, which is
currently used by the UML and MOF libraries.
My idea for the next version of the library was to write a code
generator, which would generate C# code for DTOs and a serializer
class from a MOF definition. This project is currently halted due to
lack of spare time (it's 90% completed aprox.), but if you're willing
to take a look I can upload it.
A related project that can be undertaken is a generator of MOF
definitions from C# assemblies. The generated file could be used to
generate an XMI serializer for existing libraries.
More information about the Mono-list