XML Import-Export

Introduced in Tiki3

(2022-08-14) The XML Import-Export feature is outdated, thereby broken and barely documented. It uses image galleries, which are no longer supported in Tiki. Both the import and export of images is broken.

It was possible to import/or export a list of pages or a structure in an xml format
Each page could be exported with:

The export produced a zip file containing

Example of a wiki.xml page

<pages> <page zip="noel/page.txt"> <name>noel</name> <user>me</user> <comments> <comment>Joyeux Noel</comment> </comments> <images> <image zip="test1/images/fgal/2" where="fgal"> <wiki>/test/tikiwikitrunk/tiki-download_file.php?fileId=2&amp;display</wiki> </image> </images> <attachments> <attachment filename="noel.jpg" attId="1" zip="test1/attachments/1"> <filesize>89597</filesize> <filetype>image/jpeg</filetype> </attachment> </attachments> <history> <version version="1" zip="test1/history/1.txt"> <user><![CDATA[admin]]></user> </version> </history> </page> </pages>

This example is very simplified. More fields are provided

For a structure we will have something like

<structure> <page><name>noel</name></page> <structure> <page>1 noel</page> <structure> <page>1.1 noel</page> </structure> <structure> <structure> <page>2 noel</page> </structure> </structure>

The export could be done in wiki->List pages or in Structures-> List structures
The import could be done by calling tiki-import_xml_zip.php
You need to have tiki_p_admin to do the import and the export



The ZipArchive class for php must be installed
(Example: for gentoo, emerge pecl-zip and restart the server)


The documentation is incomplete. It consists only of the two examples above. The XML Import-Export feature uses the Smarty template engine to generate the xml.zip file. The most complete documentation is this template that is being used. It's located here in the Tiki source code: templates/tiki-export_page_xml.tpl.

Repairing XML Import-Export

For anyone who wants to repair it, here are the concerned source code files:

Entry point.
Contains a small section which is used when exporting pages.
Main code. Defines a sort of library which does most of the work. This code is mostly commented now.
Tempalte for the XML Zip Import page, used by tiki-import_xml_zip.php.
Template for the <page> element in the wiki.xml file. This means this is generating most of it.
Template for comments attached to wiki pages.


History Source