[xsd-users] setting xsd code generation with xcode

Boris Kolpackov boris at codesynthesis.com
Wed Jun 29 08:45:48 EDT 2011


Hi,

Bo Ba <bo-ba at mail.ru> writes:

> Is there a description for xsd code generation in XCODE? 
> 
> Similar to this:
> http://wiki.codesynthesis.com/Using_XSD_with_Eclipse_CDT

Unfortunately not. If you are willing contribute one, then that would
be great.

Generally, it should be pretty easy to use XSD with any IDE if you
don't need automatic schema compilation from within the IDE itself.
In other words, if you compile your schemas separately (e.g., from
the command line or via a script), then all you have to do is (1)
add the generated code to your project, (2) add include directories
for Xerces-C++ and libxsd, and (3) link to the Xerces-C++ library.

If you also want schema compilation from the IDE, then things can
be a bit more complicated. The idea here is to find the "custom
build step" facility within the IDE (most IDEs have that and the
common example that they give is how to set up the flexx/yacc
compilation). If you can find that, then the rest is just a
matter of adding a custom build step to invoke the XSD compiler
to compile your schemas. Normally you would also specify the
input/output files so that the IDE can keep track of when things
get out of date (e.g., if the schema changes or the generated
files get deleted) and run the custom build step again.

Boris



More information about the xsd-users mailing list