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
.
The QM model file is saved in the eXtensible Markup Language (XML)↑ data format. The QM package files (if external packages are used) are also saved in the XML format. The advantage of using XML is that it is a textual format and can be conveniently handled by any Version Control System (VCS)↑.
The structure of the QM XML format is described in the XML Schema↑ qm7.xsd
file, which is included in the QM™ installation folder. The most recent version of the qm7.xsd
schema is available at the following URL:
This schema location is saved in the QM XML models (starting with QM 6.0.1), as illustrated below:
The schema information embedded in the QM XML models allows easy validation of the XML against the https://www.state-machine.com/qm/qm7.xsd
XML schema. The following screen shot shows a validated QM model.
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.
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.
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 checkbox 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
.
<model>.bak
gets overwritten the second and subsequent times the model is saved.