[xsd-users] New feature

Deane Yang deane at kalotay.com
Tue Sep 19 14:18:11 EDT 2006


Boris,

Thank you very much for your response. I just had one quick small 
question below.

Boris Kolpackov wrote:
> Deane Yang <deane at kalotay.com> writes:
>
>   
>> Shouldn't it be possible to go the other direction and generate code that
>> will convert the C++ objects into XML?
>>     
>
> This questions can be interpreted in two different ways:
>
> 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.

>
> 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.

Regards,
Deane



More information about the xsd-users mailing list