QM 5.1.3
QM Model File

The QM Model is saved between sessions to a QM model file (or to multiple model files, if you use External Packages). The QM™ model file has the default extension .qm.

Note
This section describes the basic format of a QM model file, as it is stored on disk. Please refer to the Section QM Model for information about the logical structure of the QM model, as it is presented to the user during a QM session.
QM Model File on Disk
Attention
Even though the model file (as well as package files) are in principle human readable, you should not modify them in a general-purpose text editor or an XML editor, because you might break the internal cross-model references embedded into the XML (e.g., a reference from a class to its superclass). Any changes to the model files should be done exclusively by the QM™ modeling tool and therefore, to prevent inadvertent modifications, the QM™ Model File is saved as read-only.

QM File XML Format

The QM model file, as well as the QM package files (if external packages are used) are saved in the eXtensible Markup Language (XML) data format.The advantage of using XML is that it is a textual format and can be conveniently handled by any Version Control System (VCS).

QM Model File Viewed in an XML Editor

Model Link Comments

Starting from version 4.0.0, QM allows you to save model files with special comments that contain Fully Qualified Item Names. This feature is controlled by the save links property of the Model Property Sheet.

The primary usage scenario for this feature is as follows: you have two versions of the same model (e.g., created by two developers working independently, or just two versions created at different times). You can use any text-differencing tool (e.g., WinMerge) to difference the two model files in XML side-by-side. In such views, you can very easily see both the differences and the model-links.

Side-by-side differencing of QM model files

The model-link comments obviously take some additional space in the XML file, but the benefit of having them is that you can easily copy the comment just preceding the difference to the Clipboard (Ctrl-C) and then click on the QM tool and "Paste the Link" (F5). This opens the model element where your models differ. From there, you can typically resolve the merge conflict quite easily within QM. If you go systematically through all your differences in XML model files, you can be sure that you have addressed all the differences. You need to try it in practice to appreciate the method.

Attention
You should never edit your XML model files "manually" outside the QM modeling tool

Automatic QM File Backup

QM can make automatic backups of the QM model file as well as the QM Package Files (if used). This option is enabled by the checkboxk in the File Menu.

Create Backups option in the File Menu

When "Create Backups" is enabled, QM will save the previous version of the model into the file <model>.bak before saving the model into a new file <model>.qm.

Note
QM creates only one level of model backups. The model backup file <model>.bak gets overwritten second and subsequent times the model is saved.

Next: QM Session File