XML to C++ the easy way

Codalogic XML C++ Binding Uses

Do you want to...

  • ...read and write XML data using C++?
  • ...speed up code development?
  • ...reduce the risk of bugs in your code?

Read and write XML data like:

    <Name>Codalogic LMX</Name>
    <Quantity>5</Quantity>

using C++ code like:

    std::cout << myObject.GetName() << ": " <<
                 myObject.GetQuantity() << "\n";

and:

    myObject.SetQuantity( 1 );
    myObject.SetName( L"Codalogic LMX" );

Codalogic LMX is a code generator that generates custom C++ classes that mirror the structure of your XML data. You can describe the structure of your XML to Codalogic LMX using an example of your XML data, W3C XML schema or an XML DTD.

This approach speeds up code development by enabling IDE code completion and reduces potential bugs by checking XML attribute and element names and types at compile time.

In short, Codalogic LMX allows you to ship a better product, sooner.

To explore Codalogic LMX further, try LMX online, download a trial version or look at the documentation.

 

The Codalogic LMX XML to C++ Workflow

Reveal the steps from generating your application specific code to your complete application...

Click on the image to walk through the Codalogic LMX XML to C++ workflow:

 

Key Features

Codalogic LMX has numerous features that make reading and writing XML using C++ easy and flexible.

Portable

  • All runtime C++ source code is provided.
  • Runs on any C++03 or later compliant compiler with conditional compilation support for C++11 features.
  • Tested on VS2019, VS2017, VS2015, VS2013, VS2012, VS2010, VS2008.
  • Tested on g++ 10.2.0, 9.1.0, 7.1.0, 6.3.0, 5.4.0, 4.7.0, 4.4.1, 4.3.3, 3.4.6, 3.2.3.
  • Code generators run on Windows and Linux, GUI-based or command-line.
  • In addition to Windows and Linux, customers have also used LMX on HP-UX, Apple, ARM, X-Scale, IBM AIX and others.
  • No dependencies on additional third-party code.
  • Generous, royalty-free licensing terms.

Customizable

  • Define your XML using XSD XML Schema, an Annotated XML Example or DTD.
  • You can add custom C++ code and behaviors to the generated C++ classes using Snippets and Snippet Event Handlers. This gives you in-depth flexibility to handle your XML and tailor the generated C++ classes to your needs.
  • The C++ types used to represent the simple XML data types can be configured using C++ language syntax. This allows you to use your own C++ data types for more seamless integration with the rest of your C++ code and there is no need to learn complex code generator configuration options. It also means there is less chance of introducing accidental differences between builds by using the wrong configuration.
  • It's easy to switch between wide C++ character strings and 'narrow' C++ character strings so you can choose your preferred way of handling XML characters at the C++ level.
  • Customize the generated method names to suit your coding convention, including converting names to and from CamelCase and/or underscore_separated.
  • When your software writes data to the generated C++ classes you can optionally enable or disable validation of the written data against the type expected by the XML schema. This allows you to trade off between testing in debug mode and performance in release mode by using a simple compiler switch.

Dependable

  • Extensive XML type checking.
  • Hard exception-safe design.
  • Continuously developed and improved for more than 8 years.
  • Extensively tested. Release regression tests take 2 days to run. Wide customer base ensures diverse 'real-world' testing.
 

The Windows® and Linux GUI interface versions make it even easier to generate C++ code. Simply select your XML schema file(s), the output file root for the C++ / HTML files, and press the compile button!

WinLMX GUI Interface for XML C++ data binding

The Windows® Interface Version of LMX - WinLMX

 

Benefits

Using Codalogic LMX offers developers and businesses many benefits.

Developer Benefits

Faster coding

  • Your IDE can understand the generated C++ code allowing you to use IntelliSense and other similar code completion technology to speed up code development.
  • Application specific documentation is included in the generated C++ .h file. This speeds up code development because you can copy key constants and method names into your code.
  • Generates cross-linked HTML documentation for the generated code making it easy to find the information you need to write code.
  • The View Prototypes mode in the Win32 WinLMX GUI version allows drag-and-drop of method names and key constants directly into your code, allowing you to write code at lightening speed!

Less time chasing bugs

  • The names of methods and variables are checked at C++ compile-time rather than run-time meaning simple typos in names are detected automatically and early reducing the chance of bugs lurking in your deployed code.
  • Resource management (such as memory) is handled by the generated code so there is less chance for accidental C++ memory leaks etc.

Easy to use

  • The output is regular C++ so there is no need to learn additional libraries and complex XML DOM / XPath syntax.
  • No programming of tedious state code as required with SAX (and StAX). This saves you doing boring repetitive C++ programming tasks, and leaves you free to do more interesting tasks.
  • A minimal number of binary or C++ source files are required making LMX simple to build into your project. This saves you time managing builds and has less chance of build errors.
  • First class support. If you have questions, just . We want you to succeed.
 

Business Benefits

Ship earlier

  • Get revenue from your product sooner and get real end-customer input enabling earlier iterations.

Make a better product

  • Reassign developer resources to adding extra customer pleasing features rather than doing low-level, low-ROI coding.

Reduce training requirements

  • Developers can access your XML data using regular C++ and don't need additional training to understand specialist XML technologies.

Cost Effective

  • Generated code and runtime are Royalty Free so you can ship your application to as many customers as you like without additional license fees.

 

Customers and Testimonials

World leading companies that rely on LMX's XSD C++ XML data binding capabilities include:
Boeing, Lockheed Martin, General Dynamics, BAE Systems, Northrop Grumman, QinetiQ, Federal Aviation Administration (FAA), Rolls Royce, Hewlett Packard, Avaya, Samsung, Cisco, NXP, Seagate, Nomura, Schlumberger, ABB Power Technologies, Union Pacific Railroad, CSX Railroad, ... and more

Here are some of the testimonials our customers have submitted about LMX XSD C++ XML data binding:

    "I really like LMX. I can finish my tasks faster and it makes things much easier, especially with such a complete documentation." - Haryono Dianto, Barco Inc.

    "Easily the best (most accurate) XML data binding of the tools I've used. And they have the best support I've received from ANY vendor for any tool. Would highly recommend to anybody that needs this ability." - Nick Godbey, SITA

"LMX is a professionally developed product with many great features. The support from Codalogic is the best I've seen and I've been using vendor products for 30 years. "

"[LMX] is much more faster and easier in use than our previous solution" - Stanisław Wierchoła, Gadu-Gadu

"LMX is a really good product; fits right in with what we need to do." - Jeff Hay - (Using Multiple Architectures)

"Thanks for your exceptional service, as always!" - Dave Webb

"LMX is working like a charm" - 3DCONNEXION - (Using Apple/Mac)

"Our experience has been very positive (especially when compared to using the [ed. other product] code generation)."

"Your documentation is much clearer than other products I looked at." - British Telecom

"The supporting code compiled on Itanium without problems" - (Running on HP-UX)

"LMX comes with very complete documentation." - Ronald Bourret's XML Data Binding Resources

"Its a pretty handy tool, and exceptionally small in size!!!" - (Using ARM/X-Scale Architecture)

"Thanks for the rapid response, as usual." - University of Teesside School of Health & Social Care

 

Let our customers tell you what they think about Codalogic LMX in their own words...

Nils Schulte

Ease of code generation:
Ease of using generated code:
Quality of documentation:
Quality of support:
Overall rating:
What features do you like best about LMX:
-Many easy-to-use unmarshalling functions (from file / from string ...)

-Detailed error reporting for unsmarshalling (lmx::s_debug_error)

No dependencies to further libraries (boost or similar)

-Integration into Visual Studio was easy.

What features do you have problems with, need improving or adding:
Documentation might be improved.

What are your overall thoughts on using LMX:
I am very confident with LMX

Andreas Wehrmann

Ease of code generation:
Ease of using generated code:
Quality of documentation:
Quality of support:
Overall rating:
What features do you like best about LMX:
Portability. This is very important to us since we use LMX generated code not only on the PC platform (Windows/Linux) but also on embedded (Linux) platforms; that is:

m68k Coldfire V4e (MMU) as well as uCLinux (m68k Coldfire nommu)

What features do you have problems with, need improving or adding:
None so far.

What are your overall thoughts on using LMX:
I like it because it simply works and is easy to work with. The documentation (with code examples) allows a fast start up and the time from getting to know LMX till producing productive code is very short. In short I can say: XML processing without headaches.

Simon Powell

Ease of code generation:
Ease of using generated code:
Quality of documentation:
Quality of support:
Overall rating:
What features do you like best about LMX:
The simplicity of use of the generated code - the generated classes are very easy to manipulate, with very straighforward methods of accessing the insides of hierarchical data structures, making code that uses them quite compact, quick to write, and easy to follow and maintain. E.g. having a choice between accessing internal containers and using simpler direct access functions makes code much easier to read.

Thoroughness of the implementation - it appears to be mature product, and a lot of different usage cases seem to have been provided for, and there is really good provision for customisation of the generated code and the conversions to/from XML. Having used it for some time now, I feel safe that we are unlikely to get caught out by some slightly awkward or obscure future requirement.

Portability - by having the source for the entire conversion library, and not having any internal reliance on windows libaries, we know that we can move to another platform of our choice if neccesary without changing the tool and therefore changing all the code that makes use of the generated classes.

Efficiency - experience so far has shown the generated code appears to be efficient when used in a near real-time environment, because it converts directly between XML and the C++ data structures rather than relying on an intermediate data structure. By not relying on an external third party XML parser, and having access has also made it easier to integrate with our software.

Support - We have had very good customer support, with very quick responses on low-level technical questions right from the start.

Licensing - the licensing model is realistic for a company of our size with no prohibitive clauses on linking to generated code, etc.

What features do you have problems with, need improving or adding:
We've had a problem/query with the handling of XML that uses substitution by type.

We've had some minor problems with a class hierarchy that mixes derivation by restriction with derivation by extension.

The handling of enums isn't really suited to what we do, and I think is a bit of a weakness (it is still better than some of the other tools, though!). I have worked around this successfully. [Note from Codalogic: We have since added the -enums-per-type flag in v6.2 to address this issue.]

What are your overall thoughts on using LMX:
We needed something we could rely on for a lot of future work, so there was quite a lot riding on our choice of tool. After a fairly in-depth comparison between LMX, [redacted], [redacted] and [redacted] over several weeks, I chose LMX, and having used it a great deal since, am convinced we made the right choice, and think it is a very comprehensive and well thought-out product.

David Zavetz

Ease of code generation:
Ease of using generated code:
Quality of documentation:
Quality of support:
Overall rating:
What features do you like best about LMX:
I like that it does exactly what we purchased it to do - generate C++ from schema. It just works.

Eric W. Sirko

Ease of code generation:
Ease of using generated code:
Quality of documentation:
Overall rating:
What are your overall thoughts on using LMX:
A robust, industrial-strength tool.

Altran-Xype

Ease of code generation:
Ease of using generated code:
Quality of support:
Overall rating:
 

Sharing With Your Team

Discuss LMX with your team by emailing them a link this site or downloading our slide decks to aid the conversation.

Any Questions?

Providing exceptional support is very important to us. If you have any questions about Codalogic LMX XML C++ Databinder, please send a message to .

What do you want to do now?

You can:

Providing exceptional support is very important to us. If you have questions about Codalogic LMX XML C++ Databinder, please send a message to .

Note that you can also access these pages using the convenience URL http://www.xml2cpp.com.

Copyright © 2003-2021, Codalogic Ltd. All Rights Reserved.