translate an XML file at compile time into the dataobject model generated by CodeSynthesis XSD

422 Views Asked by At

With the help of CodeSynthesis XSD a C++ dataobject model can be generated from an XML Schema (XSD). A valid XML file can then at runtime be read into this dataobject model with the help of the generated XML parsing functions.

I wonder if it is possible to generate the C++ code that initiates an object that represents a specific XML file at compile time. In other words, instead of reading the XML file at runtime, I would at compile time like to generate C+++ code to get the same object that I would have got with the XML parsing functions.

I understand that at compile time it is possible to first read in the XML file into the C++ dataobject model and then write it out to one of the binary formats CodeSynthesis XSD supports. This would certainly speed up reading in the data at runtime, but I am interested if it is possible to generate out C++ code to get a "compiled in" object.

0

There are 0 best solutions below