The original post asked how to generate a working UI at runtime from a specification for the UI written in XML.
This is common in many commercial and open-source simulation platforms including those used primarily for games.
Not easy in 1997.. Maybe easier today, in 2025. search for "Immediate Mode GUI library"
TLDR:
An early example of such a UI is present in the open-source Flight Simulator, FlightGear. It is entirely driven in runtime by XML, and includes the usual UI elements Menus, Keymaps, Dialogs and the usual suspects for dialog widgets. Flightgear was started in 1997. So the idea of an XML-driven menu system was quite new. Flightgear at that time used PLIB for its UI. In its next branch, it will be converting away from PLIB to a separate internal GUI library.
The FlightGear's source code is hosted on GitLab. The current implementation does not use QT for the in-simulation UI. The UI seen once the simulator is running is generated on the fly. Many menu items and dialogs are specific to particular aircraft and their corresponding cockpit components and are supplied as part of an aircraft specification. Aircraft are developed and maintained separately from the Simulation program.
See flightgear.org for more information.