[xsd-users] New feature

Boris Kolpackov boris at codesynthesis.com
Tue Sep 19 14:31:57 EDT 2006


Deane,

Deane Yang <deane at kalotay.com> writes:

> >1. Can the objects generated from XML Schema (using C++/Tree mapping)
> >   be serialized to XML? The answer is yes. You will need to use the
> >   --generate-serialization option when translating your schemas. The
> >   library example in examples/cxx/tree/library shows how to do it.
> >   There is also a separate chapter on serialization in the manual.
> >
>
> I just noticed this part of the manual, and it does look like what I was
> asking for. I just wanted to confirm that a round trip works, namely:
> C++ object -> XML -> C++ object
> results in the same object as the original.

Yes, that's how it works. You can also save to a binary format (e.g.,
CDR): C++ object-> Binary -> C++ object.


> >2. Is it possible to automatically generate some code that will
> >   serialize arbitrary C++ object to XML? The answer is no, at least
> >   not with XSD.
> >
>
> No, I didn't mean this. Your response is interesting, however.

I was thinking about all this lately and I guess my mind seized the
opportunity ;-).


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20060919/a5e5a9a8/attachment.pgp


More information about the xsd-users mailing list