Import XML

Overview

An overview of importing documents using Sophora's import XML including the general structure of a Sophora import XML file.

The general structure of a Sophora import XML file looks like the following:

<?xml version="1.0" encoding="UTF-8"?>
<document nodeType="NODETYPE"
          xmlns="http://www.sophoracms.com/import/4.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <properties>
    [...]
  </properties>
  <childNodes>
    <childNode nodeType="NODETYPE" name="CHILDNODE-NAME">
      [...]
    </childNode>
  </childNodes>
  <resourceList>
    <document nodeType="NODETYPE" externalID="EXTERNAL-ID">
      [...]
    </document>
  </resourceList>
  <fields>
    [...]
  </fields>
  <instructions>
    [...]
  </instructions>
</document>

The root element is <document>. Its attribute nodeType specifies the node type this document shall be assigned to. This property is required for new documents and all child nodes. Such a document comprises its properties (<properties> element), the entailed childnodes (<childNodes> element) and assigned documents (<resourceList> element). Furthermore, the <fields> element contains the document's metadata.

<?xml version="1.0" encoding="UTF-8"?>
<document nodeType="sophora-content:story"
          xmlns="http://www.sophoracms.com/import/4.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.sophoracms.com/import/4.2 http://www.sophoracms.com/import/4.2/sophora-import-4.2.0.xsd">

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