XML Reference

Category XML File format

Versions of CM1 prior to Version 5.3 use the following XML file format:

 <Tree label="Categories">
<Node id="sampleheading1" label="Sample Heading 1">
<Node id="samplecategorya" label="Sample Category A" selectable="yes" />
<Node id="samplecategoryb" label="Sample Category B" selectable="No" />
</Node>
<Node id="sampleheading2" label="Sample Heading 2" selectable="yes">
<Node id="samplecategoryc" label="Sample Categoty C" selectable="yes" />
<Node id="samplecategoryd" label="Sample Category D" selectable="yes">
<Node id="samplesubcategory1" label="Sample Sub Category 1" selectable="yes" />
<Node id="samplesubcategory2" label="Sample Sub Category 2" selectable="yes" />
</Node>
</Node>

</Tree>

After Version 5.3 the Category file has a revised format:

<CategoryTree title="Categories" sitename="xyz">
<Children title="Sample Heading 1" showInPgMetaData="true" selectable="true" initialViewCollapsed="true" id="b0beb6d8-455a-4b65-8d5d-c3d6eea4612c" deleted="false">
<Child title="Sample Category A" showInPgMetaData="true" selectable="true" previousCategoryName="Sample Category 1" lastModifiedDate="2015-11-25T09:19:17.170" lastModifiedBy="Admin" initialViewCollapsed="true" id="77dc9d0c-f6f7-4060-493c-75af34bab14a" deleted="false" creationDate="2015-11-25T09:18:41.936" createdBy="Admin"/>
<Child title="Sample Category B" showInPgMetaData="true" selectable="true" previousCategoryName="Sample Category 2" lastModifiedDate="2015-11-25T09:19:22.488" lastModifiedBy="Admin" initialViewCollapsed="true" id="c1bd050b-2c30-0f98-1cea-df035d326c20" deleted="false" creationDate="2015-11-25T09:18:55.410" createdBy="Admin"/>
</Children>
<Children title="Sample Heading 2" showInPgMetaData="true" selectable="true" initialViewCollapsed="true" id="c91a6f11-0483-299b-c1fd-b77673cca773" deleted="false" creationDate="2015-11-25T09:18:33.692" createdBy="Admin">
<Child title="Sample Category C" showInPgMetaData="true" selectable="true" initialViewCollapsed="true" id="f21c9ec1-f1a2-a8a5-ece4-2d6995d62cbf" deleted="false" creationDate="2015-11-25T09:19:26.197" createdBy="Admin"/>
<Child title="Sample Category D" showInPgMetaData="true" selectable="true" initialViewCollapsed="true" id="17265be0-f654-bb71-a17f-9e625e2938b2" deleted="false" creationDate="2015-11-25T09:19:40.840" createdBy="Admin">
<Child title="Sample Sub Category 1" showInPgMetaData="true" selectable="true" initialViewCollapsed="true" id="f3b30ba1-52f4-1db2-b593-99fae05a2308" deleted="false" creationDate="2015-11-25T09:19:49.527" createdBy="Admin"/>
<Child title="Sample Sub Category 2" showInPgMetaData="true" selectable="true" initialViewCollapsed="true" id="bc96189a-3cef-666b-8c88-1416dd85d7fe" deleted="false" creationDate="2015-11-25T09:19:58.813" createdBy="Admin"/>
</Child>
</Children>
</CategoryTree>

 

The major differences in the old and new formats are :

  1. The elements in the new xml format are named differently

    • Tree → CategoryTree

    • Node → Children (top level nodes only)

    • Node → Child (all subcategories)

  2. The id used in the new format is unique using the guid format.

  3. There are a few new properties now that are associated with a category:

    • title → previously named as label.

    • showInPgMetaData → only if true, the category will be shown in the page meta data. Default is true.

    • initialViewCollapsed → This is being used by the category editor to show the category with sub children as collapsed in the tree. Default is true.

    • creationDate → The date on which the category was created.

    • createdBy → The user who created the category. If the categories were created due to transformation of the old to new format, then this field has value “Transformation”.

    • previousCategoryName → Value of category title before last modification.

    • lastModifiedBy → Name of the user who made the latest modifications.

    • lastModifiedDate → Date of the latest modification.

    • deleted → If the user deleted the category, it stills stays in the category xml, but is it marked as true for deleted. These deleted categories are not displayed in the editor.

    • selectable → this property is the same as before. It makes the category selectable and so it will appear in the widgets. Default is true.

  4. The new category xml format reserves a field for the sitename, for a future release.