[xsd-users] xsd to xml parser

Boris Kolpackov boris at codesynthesis.com
Wed Aug 26 16:43:12 EDT 2009


Hi,

ss ak <ssak22 at gmail.com> writes:

> I have generated the C++ binding using the below...
> 
> xsd.exe cxx-tree --root-element-first --generate-serialization
> --generate-from-base-ctor --generate-default-ctor v4.xsd
> 
> using the classes,i filled in the values...
> 
> Now how to i make these classes into XML??? or print as an XML.

You would use serialization functions for that which are generated
when you specify the --generate-serialization option. Take a look
at Section 2.5, "Adding Serialization" in the C++/Tree Mapping
Getting Started Guide for a quick overview:

http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#2.5

For more a detailed information, see Chapter 6, "Serialization" in
the same document:

http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/guide/#6

There are also a number of examples that demonstrate how to save the
object model to XML. The 'library' example in the examples/cxx/tree/
directory would be a good start.

Boris




More information about the xsd-users mailing list