Project File

From Q
Jump to navigation Jump to search

All work done in Q is saved in the Project File (.Q). This file does not contain the data itself and cannot be opened without the data. A single file containing both the data and the work done in Q is a QPack. The information below describes technical details about the underlying format of the Q Project file and is not necessary to understand how to use Q.

Reading the project file

Q’s project file, which has a file extension of .Q and which stores all the work done in Q, is a type of file known as an XML file. Such files can, with a bit of hard work, be read if opened up in a text editor. They can even be used to identify who made what change and when.

For example, the following shows that variable Q24_8 has had the value of 1 recoded as -100:

      <Values type="Numeric">
        <Value missing="false">
          <DefaultLabel>Strongly disagree</DefaultLabel>

Similarly, the following shows some of the text data coded as being “Functional”.

      <Code name="Functional" value="1">
          <Match>h diet</Match>
          <Match>maximum flavour</Match>
          <Match>sugar free</Match>

The following describes some detail about a particular table that has been created which has been named Market Share. At first glance this seems impenetrable, but with a little digging interpretation is possible.

    <Table change="33" locked="true">
      <Weight qset="c969c90d-1dfd-420b-810b-70d0047e06d2">valueWeight</Weight>
      <Name>Market Share</Name>

The line <Show>cf5623b0-326c-4e95-9883-38e349aa816c</Show> means that the question shown in the blue drop-down has the internal name of cf5623b0-326c-4e95-9883-38e349aa816c. However, a search through the file quickly reveals that cf5623b0-326c-4e95-9883-38e349aa816c is a question called Brand purchased.

Similarly, Table change="33" indicates when the table was changed. At the end of the file you can access details about who changed what and when. For example:

<Modified change="33" date="Wednesday, 18 July 2012" time="3:58:46 PM" user="tim" />

Indicates that the user named Tim saved the most recent changes to the table on the 18th of July.

Directly writing and editing project files

Although the project file can be used for auditing purposes it is not a good idea to attempt to write code that either reads this file or writes these files as the format is constantly revised.