XML News from Tuesday, September 19, 2006

Code Synthesis has released xsd 2.3.0, a free-as-in-speech (GPL) W3C XML Schema language based data binding tool for C++.

Given an XML instance description (XML Schema), it generates C++ classes that represent the given vocabulary as well as parsing and serialization code (collectively called a mapping or binding).

Compared to APIs such as DOM and SAX, the generated code allows you to access the information in XML instance documents using your domain vocabulary instead of generic elements, attributes, and text. Static typing helps catch errors at compile-time rather than at run-time. Automatic code generation frees you for more interesting tasks while minimizing the effort needed to adopt your applications to changes in the document structure.

xsd supports two C++ mappings: in-memory C++/Tree and event-driven C++/Parser. The C++/Tree mapping consists of C++ classes that represent data types defined in XML Schema, a set of parsing functions that convert XML instance documents to a tree-like in-memory data structure, and a set of serialization functions that convert the in-memory representation back to XML....

The C++/Parser mapping provides parser templates for data types defined in XML Schema. Using these parser templates you can build your own in-memory representations or perform immediate processing of XML instance documents.

2.3.0 allows the generated code to contain user-defined types and improves performance.