Import XML

Importing Categories

How to import categories.

To import categories, the root element of an import XML file has to be <sophora>. This element must contain a child element <categories> which encapsulates the <category> elements. Each <category> element represents one category. The content of a <category> element has to contain the entire path of the category (path elements are separated by semicolons). If a given category already exists in the repository this category is ignored during the import process.

The following example demonstrates the XML of a category import:

<?xml version="1.0" encoding="UTF-8"?>
<sophora xmlns="http://www.sophoracms.com/import/4.2"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <categories>
    <category>Styles</category>
    <category>Styles;Casual</category>
    <category>Styles;Catwalk</category>
    <category>Styles;Feminine</category>
    <category>Styles;Formal</category>
    <category>Styles;Printed / Embellished</category>
    <category>Types</category>
    <category>Types;Accessories</category>
    <category>Types;Accessories;Bags</category>
    <category>Types;Accessories;Belts</category>
    <category>Types;Accessories;Jewellry</category>
    <category>Types;Accessories;Shoes</category>
    <category>Types;Blouses</category>
    <category>Types;Dresses</category>
    <category>Types;Jackets</category>
    <category>Types;Knitwear</category>
    <category>Types;Outerware</category>
    <category>Types;Prints</category>
    <category>Types;Shirts</category>
    <category>Types;Skirts</category>
    <category>Types;Sweatshirts</category>
    <category>Types;T-Shirts</category>
  </categories>
</sophora>

Last modified on 10/16/20

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon