I have to write a C++ Application (using the Qt Framework for the GUI) that can edit data stored in xml files described by a xsd schema file. Is there a tool to convert the xsd schema into C++ Classes?
The purpose of an XML Schema is to define the legal building blocks of an XML document: the elements and attributes that can appear in a document. the number of (and order of) child elements. data types for elements and attributes.
XML schemas are written in XML while DTD are derived from SGML syntax. XML schemas define datatypes for elements and attributes while DTD doesn't support datatypes. XML schemas allow support for namespaces while DTD does not. XML schemas define number and order of child elements, while DTD does not.
A separated file is created for XSD and this document is linked with the respective XML document. With XML Schema Specification a method is specified which is to be included in the root of the XML Document.
Sounds to me like CodeSynthesis is exactly what you are looking for. It's open source and c++.
See XmlPlus-xsd2cpp at Google:
XmlPlus xsd2cpp provides "simple to use" C++ XML data-binding through W3C XML-Schema.
Usage of XmlPlus is covered by the GNU Lesser General Public License
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With