Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
developer90210
Contributor II
Contributor II

What do the xml's in the prj folder actually do?

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.

prj

Now when you reload your dashboard the -prj folder will magically* fill up with xmls  similar to the image below:

XMLList

∗Magic requires 4 AA batteries (not supplied).



Whats in that -prj folder?

A number of XML files.

Lets run through the main ones.

QlikViewProject.xml

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.

AllProperties.xml

Variable names and field information at both dashboard and QlikView level. Constraint types, icon types.

TopLayout.xml

Tells the the application what colours and styles to use by default.

DocInternals.xml

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.

DocProperties.xml

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.

XMLExample.PNG

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.

Also....


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! 

2 Replies
jwjackso
Specialist III
Specialist III

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.

developer90210
Contributor II
Contributor II
Author

Hi Jerry,

That's a nice way of doing it; a lot more refined than my initial attempts and there's no need to edit the QlikViewProject file either

We're looking at creating a "catalogue" of objects we can re-use across a range of different QV products and using the XMLs seems like a good fit.

There doesn't seem to be much detail about this stuff so it's good to know there are others a bit further down the road that have left us a trail to follow

Thanks for the feedback!