[xsd-users] "Save as XML" question

Alexander Petry petry at itwm.fhg.de
Mon Feb 11 05:19:42 EST 2008


Hi Ivan,

* Ivan Markovic <ivan at mapsoft.co.yu> [080211 09:39]:
> Hi all,
> 
> I need to make "Save as XML" option for existing app. What is the right approach?
> 
>  
> 
> 1. To create schema file first, parse it to get the set of hxx/cxx classes and then use them. In this case I need to deploy xsd and use it each time I start my app?

I believe the first part of  this approach is the right one. Simply create
the XML  Schema that fits your  demands and create the  hxx/cxx files with
xsd (have a look at the option --generate-serialization). You only need to
perform this  step in case  you change your  schema not each time  you run
your  application. Finally  you have  to use  the  serialization functions
generated by the  xsd compiler from within your  application and recompile
it. That should do the trick.

Have a look at the following manual, especially chapter 4 (Serialization):

http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/

> 
> 2. Or, I can start from scratch, create set hxx/cpp classes and just use them for serialization?

I don't  understand what  you mean  by "start from  scratch", but  the xsd
compiler  is able to  generate serialization  functions for  the generated
classes.

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20080211/776a4f57/attachment.pgp


More information about the xsd-users mailing list