[xsd-users] xsd and member functions

Boris Kolpackov boris at codesynthesis.com
Wed Jul 3 09:23:32 EDT 2013


Hi Giuseppe,

giuseppe ferrari <giuseppe500 at yahoo.it> writes:

> is possible to add a simple member function to all generated types of
> xsd from an .xsd?

You can do that using the type customization support. It is not automatic,
but possible. Maybe create a class template that "wraps" all generated
classes and adds what you need. You would loose the constructors, but
it is probably a small price to pay, especially if you don't need to
create object models from scratch.

For more information on type customization, see the C++/Tree Mapping
Customization Guide:

http://wiki.codesynthesis.com/Tree/Customization_guide

As well as the examples in the examples/cxx/tree/custom/ directory.

Boris



More information about the xsd-users mailing list