[xsd-users] Efficient XML Interchange Format (Exi)

Boris Kolpackov boris at codesynthesis.com
Mon Jan 26 10:27:12 EST 2009


Hi Raymond,

Rizzuto, Raymond <Raymond.Rizzuto at sig.com> writes:

> Our schema is pretty complicated, with a lot of polymorphism. I would
> hate to have to hand-write the C# code to deserialize the XDR.

I agree, hand-writing this will be a maintenance nightmare. The only
reasonable option with this approach is to auto-generate the C# code
by customizing the XSD compiler.


> One option might be to create a C++ library from the XSD generated 
> code, and then link that into the C# application. I believe that is
> possible, though I haven't done it myself.

I think (though I am not 100% sure), the code should be written in
managed C++ for this to work. If you want to go this way, then using
SWIG[1] seems the most promising. Though it looks too magical to me
(for example, I cannot imagine how the wrappers will handle polymorphism).

Unfortunately there does not seems to be an easy solution for your
problem. In your situation (i.e., complex schema with polymorphism),
binary XML, while sub-optimal, seems like the most realistic approach.

[1] http://www.swig.org

Boris




More information about the xsd-users mailing list