What do the xmls in the prj folder actually do? Most of the stuff I saw has been about version control but nothing about what the specific files do. I've attempted some (admittedly not very deep) digging and outlined my conclusions here. If anybody has more detailed information then I'd be glad to hear/read it.
What's that then?
XML - eXtensible Markup Language. A bit like HTML but more about structure than "looks".
For QlikView, the xml files contain the attributes which describe how the objects/sheets function, display and behave. Its the qv document in xml form. The "Master Items" of the QlikView world.
Where can you find them?
In the -prj folder.
I don't have a -prj folder
Lets make one then. All you need to do is create a folder with the same name as your qv document but with the suffix -prj. For example, If you've got a dashboard called ExcitingKPIs then create a folder called ExcitingKPIs-prj.
Now when you reload your dashboard the -prj folder will magically* fill up with xmls similar to the image below:
∗Magic requires 4 AA batteries (not supplied).
Whats in that -prj folder?
A number of XML files.
Lets run through the main ones.
Contains the list of objects used in the dashboard. The location, relationship, position (x and y coordinates), width, height etc of each object is documented here. So, what szie the object is and where to place it. What object sits on what sheet. Each individual object also has its own xm file in the prj folder.
This is the key file that needs updated with the object xmls. The “master” document that references all the other xmls. Similar to an index. If you’ve copied across some object xmls into the -prj folder and not referenced them in the QlikViewProject.xml then it wont display on your dashboard. As far as QV is concerned it knows nothing about your objects. Nothing at all. Like a school register - If a new pupil joins the class and they're not in the register then their name wont get called out.
Variable names and field information at both dashboard and QlikView level. Constraint types, icon types.
Tells the the application what colours and styles to use by default.
Contains the bookmarks and field names used in the dashboard. The field names used in the document are grouped as integers, numeric, text, keys etc.
Default values such as fonts, colours, dates, day names, month names, print settings etc. Also contains any actions that trigger on opening the document (eg only show last 7 days of data). Possibly also for use if you want to keep particular themes/ or colours(?)
Object XMLs: eg TX5720.xml, CH01.xml
The first 2 character refer t the type of object it is. TX – Text Box, CH- chart, LB – List Box etc.
All objects in a dashboard are also stored in the -prj folder. They contain information about font size, colours, labels, expressions, whether to show text or an image etc. Basically the QlikViewProject file tells the object where to sit and the object xml tell it how to look and behave.
The XML names are the object ID's and can be found in QlikView by selecting the object, selecting properties --> General tab -->Object ID. Changing the name in the properties tab will also change the name here.
Useful if you want to rename something from CH01 to SalesChartArea for example - easier to find also!
There are other files (no less important but in reality......less important)
LoadScript.txt - this is the load script that run's when the dashboard is refreshed. It's the script you can see if you open up your dashboard and select File --> Edit Script.
Module.txt - contains any macro code, if your using it in the document.
DocBinary.dat contains user sensitive data, such as passwords. Probably of more interest if you're using things like Section Access.
The xml's I've used have usually been the QlikViewProject.xml and the relevant object xml's when I'm attempting to copy them across to another dashboard to keep with a theme/design. I've rarely touched the others but that's mainly through caution since I'm not entirely sure what they do.
Why is the xml stuff important?
Version Control. But that's really boring .
It’s important because, if we were to lose our Dashboards, we could potentially recreate them using the XMLs.
We could re-use objects across dashboards. We could copy the xml/s for a specific object (eg a slick menu containing several components interacting with each other which you've spent a long long time perfecting) and paste those xmls into another dashboards prj folder so that the menu will look and behave exactly the same way regardless of where we put it. Pixel perfect every time.
If I've missed anything or got something totally wrong then feel free to let me know!
We used the -prj folder for multi-user development. Create a folder with the application and -prj folder. Suppose you are to develop chart1 and I need to develop chart2 on a sheet. In the application, create a generic text objects called chart1 and chart2.
I copy the application and -prj folder to my work folder, you copy the application to your work folder.
I delete the text object called chart2, save my application. I then create the real chart2. Once I'm done, I save my application. The chart2 xml file can be copied to the original application -prj folder. When the application is opened, my real chart2 has replaced the placeholder text object.
When you are done with your chart1, you copy your chart1 xml file to the application -prj folder.