CodeSynthesis XSD
I've recently been able to work with CodeSynthesis XSD which is a (as lifted from their site):
CodeSynthesis XSD is an open-source, cross-platform W3C XML Schema to C++ data binding compiler. Provided with an XML instance specification (XML Schema), it generates C++ classes that represent the given vocabulary as well as parsing and serialization code. You can then access the data stored in XML using types and functions that semantically correspond to your application domain rather than dealing with intricacies of reading and writing XML
It's a good thing especially if you're like me who doesn't like dealing with the intricacies of XML in C++, or the intricacies of XML for the matter. Although I have some idea of how XML can be used and how to make a valid XML document, I wouldn't like to tackle validation and parsing from scratch. Good thing this tool allows me to concentrate on dealing with an XML document as an object in C++ and not have to understand the cartwheels required when using something like libxml++ .
The good thing about this code generator is that it generates code from an XSD or XML Schema Definition file. The resulting code is in C++ which gives you an object model that uses the STL containers and STL data types to which the XML types correspond to.
What this tool allowed me to do is to concentrate on the more important matters with regards to the XML document, and not have to worry too much about the boiler-plate code usually required when dealing with XML by hand.
Of course, don't take my word for it, give it a whirl.
The author would like to acknowledge the excellent work the people from CodeSythesis and contributors to the XSD project have done to come up with a really valuable tool.



0 comments:
Post a Comment