It seems that newer versions of confluence have a slightly different way of storing labels in the xml. The version on confluence that I tested was 8.5.4. I suspect that the change was added in 8.0 but some testing/more investigation needs to be done. The relationship between the pages and the labels was denoted by a collection of labels inside the page object:
<object class="Page" package="com.atlassian.confluence.pages">
...
<collection name="labellings" class="java.util.Collection(com.atlassian.confluence.core.ContentEntityObject.labellings)">
<element class="Labelling" package="com.atlassian.confluence.labels">
<id name="id">567574538</id>
</element>
</collection>
...
</object>
Now, the relationship is determined through the `Labeling` objects (that existed in the past as well). Each object has a property that points to the label and another one that points to the page.
<object class="Labelling" package="com.atlassian.confluence.labels">
...
<property name="label" class="Label" package="com.atlassian.confluence.labels">
<id name="id">753666</id>
</property>
<property name="content" class="Page" package="com.atlassian.confluence.pages">
<id name="id">98380</id>
</property>
...
</object>
I attached a package exported from confluence 8.5.4. Thanks to Nikita Petrenko for his work on bringing this issue to light. |