Shouldn't it be possible to go the other direction and generate code that will convert the C++ objects into XML?