Generic XML Parsing in C++11: A Template Metaprogramming Adventure

Some years ago, I found myself experimenting with template metaprogramming in C++11. One of the most intriguing projects that came out of this tinkering was a generic XML parser that combined several powerful features: declarative syntax, automatic validation, and bidirectional serialization/deserialization—all without requiring duplicate code. Today I’m dusting off this experiment to share how it works and reflect on how modern C++ features could simplify this approach even further. The Goal: Declarative XML Handling The primary goal of this project was to create a system where:...

May 1, 2025 · 5 min · Manuel Herrmann