XML Import-Export

Introduced in Tiki3

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

  • its history
  • its comments
  • its attached files
  • its images

The export produces a zip file containing

  • a wiki.xml page
  • a directory for each page. And each of this directory
    • page.txt: that contains the data of a page
    • a directory attachments that contains all the attached files of the page
    • a directory images that contains all the images contained in the page (via the wiki plugin No image specified. One of the following parameters must be set: fileId, randomGalleryId, fgalId, attId, id, or src.)
    • a directory history that contains all the data of each history

Example of a wiki.xml page

  <page zip="noel/page.txt">
      <comment>Joyeux Noel</comment>
      <image zip="test1/images/fgal/2" where="fgal">
	<attachment filename="noel.jpg" attId="1" zip="test1/attachments/1">

	<version version="1" zip="test1/history/1.txt">

This example is very simplified. More fields are provided

For a structure we will have something like

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

The export can be done in wiki->List pages or in Structures-> List structures
The import can 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)