How to easily port XML to C++ code
Let’s suppose that you have an XML document and you need to process its data in a compiling language, such as C or C++. In such a case, you would have to create a program that would automatically parse the requested documents, basing on their structure.
XSD from CodeSynthesis comes to help the programmer work with XML data structures by automating the process of creation of code by creating the required C++ classes from an XML instance specification file.
By using CodeSynthesis XSD, you can easily create programs that work directly with data contained in XML files, using types and functions that correspond semantically with the required application domain instead of thinking about the ways to implement them in pure C++ language.
The extraction of data from XML written in direct representation (such as DOM or SAX) and finally its representation as a set of objects and functions that correspond to the original XML vocabulary is called XML Data Binding. The XML Data Binding Compiler establishes a binding between the XML schema and the target programming language, in such a way easing the life of the developer.
Practically, there are two ways the information can be processed by a XML Data Binding Compiler: in memory and stream-oriented. The in-memory method can be used for representing the information of tree-like documents, by creating an in-memory object model. Stream-oriented processing represents the data as a hierarchy of events, specific to the given vocabulary.
By featuring the stream oriented and in memory processing of data, together with full compatibility with XML Schema features and the creation of a well-organized and portable C++ code, CodeSynthesis XSD is the ideal and easiest way to work with the XML documents. It can work on a great variety of platforms, being written under the GPL license, so that it can assure full accessibility to the code and possibility of porting to a great variety of Operating Systems. CodeSynthesis even changed the GPL rules, so that it would be possible to use the code not only for the GPL programs but also for a great variety of other open-source licenses.

