Why W3C XML-Schema?

How do I constrain a well-formed XML document to a schema?

The XML file can have a schema specification for it. There are at least two standard ways of providing schema for XML documents: Any such schema serves the purpose of validating the XML document against it, among other things. A XML document that validates against it's schema is called valid XML document.

The W3C XML-Schema is considered to be more powerful in expressing the schema of the XML-document, than DTD. The W3C XML-Schema specification is also the more popular one, than DTD or other similar schema specifications.
To know more about XML-Schema, read W3C specifications on it. Following are a few related useful links:
Henceforth, across different sections of XmlPlus documentation, the term XML-Schema means W3C XML-Schema.

Why Data Binding?

My application needs to do XML I/O. Now that I have XML-Schemas for the XML files that my application needs to do I/O on, do I have to write custom handwritten parser for each such XML-Schema ? Couldn't the life be any easier ?

The XML data binding comes for rescue here. The XML data binding implementations typically provide following utilities: In essence, the application has to interact only with readymade in-memory object-interface. These objects hide(and save) all the complexities of XML I/O from(for) the application. Thus, one is saved from writing XML I/O implementations(ie. Classes to hold xml data, alongwith Serialization/Deserialization code) for xml data.

There are several XML data binding tools available across platforms/programming-languages.

Why XmlPlus-xsd2cpp?

Why should I use XmlPlus XML data binding tool?

Here are a few reasons:

The xsd2cpp tool is a C++ code generator. The xsd2cpp tool when invoked on an input XML Schema, generates C++ classes(headers) mapped to the input XML Schema components. Alongside, wherever needed, it generates implementation files(.cpp) for the generated C++ classes. Also, a sample application(main.cpp) is generated to show how an application could consume the generated C++ source files.

Please read other sections of XmlPlus documentation, to learn more about it.

Currently Supported Platforms(OS):
Currently Supported Encodings: