XBinder
Overview of XBinder Why XML Data Binding? XML Schema to C/C++ Code Generation Download XBinder evaluation software Links to Additional
Documentation
Overview of XBinder
XBinder is an XML Schema to C/C++ Data Binding Tool. XML
data binding is a process in which XML schema information items are transformed
into type definitions and functions in a computer language.
The source code produced by the XBinder compiler is C or
C++ code that consists of type definitions and encode/decode functions. This
provides a complete Application Programming Interface (API) for working with
all of the message definitions contained within an XML schema specification.
In addition to the compiler, a run-time library of common
encode/decode functions is also part of the package. This library contains
routines to encode and decode the base XML schema simple types (integer,
string, hexBinary, etc.). The XBinder compiler assembles a series of calls to
these functions to accomplish the encoding or decoding of more complex message
types.
Why XML Data
Binding?
Why would one need a product like XBinder? XML data
binding offers the following advantages over traditional XML API's such as SAX
and DOM:
Performance : Operations such as validation or
(de)serialization are generally faster with code generated from XML schema then
with validating parsers. The reason is because decisions can be made at compile
time and built directly into the code, whereas a validating parser loads and
uses a schema structure at run-time in order to make decisions.
Ease-of-use: Users of XML data binding applications
can work with variables and structures in their native programming language and
do not need to be concerned with the intracacies of reading and writing data in
XML form. There is a clear separation between the data formatting and parsing
layer and application layer. This increases productivity by allowing
programmers to work with what they are familiar with.
Reliability : XML data binding applications assure
the validity of generated XML documents by working at the schema level. All
documents are generated consistently. If a defect is found in the process, a
single fix to the generation or parsing process within the data binding
software assures that the fix will be propagated to all XML documents generated
by the application.
Note that XML data binding is not always the best choice
for all applications. If schemas are expected to change frequently, then the
code that uses the schemas would need to be regenerated often. This could be a
potential downside. But if the schemas are relatively stable, XML data binding
may be a good choice.
XML Schema to C or C++

The current version of XBinder is capable of generating C
or C++ source code for a given XML schema specification. The generated code
uses a common base run-time library consisting of a set of low-level primitive
C functions for encoding and decoding the base types. The code allows XML data
messages to be generated (encoded) by populating a structure and calling a
common encode function. In other similar products, this process is referred to
as "marshalling" or "serialization". XML messages can be parsed or decoded into
an equivalent generated C structure. This is referred to in other products as
"unmarshalling" or "deserialization".
In addition to C or C++ code to encode and decode XML
messages, code to print the contents of the generated structures and to
populate the generated structures with test data can also be generated. The
print functions assist in debugging as they allow the content of structures to
be easily examined. The test functions provide a means to test the generated
code and, perhaps of greater value, provide a code template for users to use to
assist in setting up code to encode XML messages.
It is also possible to generate a makefile that is
compatible with the GNU make utility or the Microsoft Visual C++ nmake utility
to build the generated code for a particular project.
|