I have set up a sort of introspection-enabling C++ library that allows, using minimum macros and a fair amount of template trickery, to declare structures and classes that get enriched with some meta-information.
This meta-information captures all important details about each field of the struct/class that you declare, and at the end of the story you are able, for each struct/class enriched in this way, to produce an xml file that dumps, for each field, its name,type,len,offset etc. etc.
For my problem, I don't need to support fields that are pointers, but only primitive types, arrays and STL containers (vectors, lists etc.)
The code that populates these meta-enriched structs/classes (the "producer"), at a certain point serializes them (for now it's a simple binary dump of all primitive types and of all the "buffers" used by the STL containers, if any).
Now I need to start developing a "reader" counterpart that is able at runtime, starting from the xml description that has been built by the "producer", to access the various fields of the stored data.
I think it's a problem of dynamic data-dictionary interpretation, but all that I have found up to know is related to read back xml data, while I have binary data and an xml description of it...
What is the best way to start on this? Is something out there that resembles this problem and that I could get inspiration from?