The API of the EXI/C runtime library is a C-style API and can be used both by C applications and by C++ applications.
The EXI/C runtime library supports two different approaches for creating or processing an EXI stream. In the first approach, the user application reads or writes the EXI document or fragment one node at a time, by calling one or more API functions for each node. In the second approach, the user application makes a single call to an API function that converts an entire document or fragment from XML to EXI or from EXI to XML. For an application that only needs to read or write EXI streams (with no XML involved), the first approach is faster. The second approach may be more convenient when a developer must add EXI to an existing application that reads or writes XML.
The EXI/C runtime library also includes some advanced features that aim to increase EXI encoding/decoding performance. One of them is the ability to pass binary values instead of strings across the API (in both directions) for the values of non-string XSD datatypes (e.g., xsd:integer, xsd:float, xsd:base64Binary, etc.) as well as for the values of enumerated datatypes.
The EXI/C runtime library can also be used for reading and writing XML 1.0 documents and fragments. This capability is used internally by the EXI/C runtime library during the conversion of an entire document or fragment from XML to EXI or from EXI to XML, but is also available to the user application through the API. Most of the API functions that read and write the nodes of a document or fragment are common to XML and EXI.
The stream reading capabilities (for both EXI and XML) of the EXI/C runtime library follow a "pull parser" model.
A SAX2-like API for C++, similar to the SAX2 API of Apache Xerces-C++ (SAX2XMLReader and handler classes), is also included for convenience. The use of this API is optional.
Trial the EXI Tools for C/C++ today!
We are here: 24 hours a day, 7 days a week.
Quickly receive answers to your support questions.