Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

XMLPageStore

Summary: Store pages as XML files
Version: 2012-12-27
Prerequisites: Requires at least PmWiki version: 2.2.0; last tested on PmWiki version: 2.2.45
Status: Beta
Maintainer: Anomen
Users: (View? / Edit)
Discussion: XMLPageStore-Talk?

Questions answered by this recipe

Store pages as XML.

Advantages:
  • pages easily editable in plain text editor
  • better handled by versioning systems (text is no longer single long line)
  • export/import pages using various tools with XML support

Description

The XMLPageStore.phpΔ script stores pmwiki pages into xml files in the wiki.d/ directory.

Installation

To use this script, simply place it in your cookbook directory and add the following lines to local/config.php:

  $EnablePageStoreXML = 1;
  include_once('cookbook/XMLPageStore.php');
  $WikiDir = new XMLPageStore('wiki.d/{$FullName}');

There's no need to convert or modify your existing pages; xmlpagestore.php can read existing pages without any difficulty. As pages are edited and saved, they will be then saved as XML files in wiki.d/. Please make sure the above cookbook script is loaded before other scripts.

If you want to convert all of your files at once append the following line to local/config.php:

    ConvertXML();

Configuration

Use $EnablePageStoreXML variable to enable/disable writing xml files.

Usage

Notes

Change log / Release notes

  • 2011-04-22 - added to PmWiki Cookbook
  • 2011-09-15 - minor fixes
  • 2012-12-27 - added support for converting all pages

See also

git repo
http://repo.or.cz/w/anomen-overlay.git/tree/HEAD:/www-apps/pmwiki/cookbook/XMLPageStore

Contributors

Comments

See discussion at XMLPageStore-Talk?

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.

Edit - History - Print - Recent Changes - Search
Page last modified on February 26, 2016, at 09:43 AM