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

Boris Kolpackov boris at codesynthesis.com
Mon Jan 26 10:35:48 EST 2009


Hi Patrick,

Paquette, Patrick <PaquetP at navcanada.ca> writes:

> > Actually, I think it should be pretty straightforward to extend XSD 
> > to automatically generate this code for C# classes. Maybe using
> > partial classes or some such.
> 
> Perhaps an implementation that involves performing the binary
> serialization algorithm defined above as a subclass of
> XmlWriter/XmlReader provided by the .NET framework, that way you don't
> need to define a new language for the xsd compiler?  Don't know which
> would be easier for you.  

Because the binary format does not include meta-data (i.e., element
and attribute names; which is one of the reasons it is faster than
XML [binary or text]), one would still need to generate the C# code
to perform extraction and forwarding to XmlWriter/XmlReader. But then,
we might as well generate the extraction code directly to C# classes
since going through XML will hurt performance.

For example, an integer in XDR is already in binary so when we do
XDR->C# we do binary to binary conversion. If we go though XML, we
have binary to text (XDR->XML) and then text to binary (XML->C#)
conversions, which seems quite wasteful to me.

Boris




More information about the xsd-users mailing list