How to convert Confluence XML storage format to wiki markup
Are you looking for a quick, unsupported but still immensely useful way of converting a page, or a small chunk of content, from the new Confluence storage format back to good old wiki markup? The new XML storage format is used in Confluence 4. Wiki markup is used in Confluence 3 and is still required in parts of Confluence 4. Graham Hannington has created a web page that does the conversion for you. His tool is called the Wikifier. Just paste in the Confluence storage format XML on the left, and see the wiki markup appear on the right immediately.
I’m busy documenting the wiki markup and storage format for all the Confluence macros. Graham’s Wikifier is proving very useful indeed, so I thought I’d tell you about it. This is what it looks like, processing the much-beloved Cheese macro:
Graham provides other resources, including an XML schema for the Confluence storage format, and associated documentation: Graham’s Confluence resources page.
One use case – converting a page to a template
One problem with Confluence 4.0, 4.1 and 4.2 is that page templates must be written in wiki markup. They do not yet support the new rich text format used by the new editor. If you have developed a page and want to convert it to a template, you’re stuck, because the content of a page is no longer available as wiki markup.
To get round this problem:
- View the storage format for the page that you want to use as a template. How? The “View Storage Format” option appears in the “Tools” menu. It is available to Confluence system administrators, and to people who have permission to use the Confluence Source Editor, which is available as a plugin.
- Copy the storage format of the page’s content, paste it into Graham’s Wikifier, and grab the wiki markup.
- Use the wiki markup to create your page template in Confluence.
See Graham’s comment announcing the Wikifier.
An extract from that comment:
What Wikifier is, and is not
Wikifier is a minimal test harness for an XSLT stylesheet I have developed that converts Confluence XML to wiki markup.
The XSLT stylesheet is by no means complete. I welcome your feedback. If Wikifier does not correctly convert some Confluence XML, please let me know (if you like, use the Contact mailto link on Wikifier), and I will do what I can (no promises, though).
Wikifier is not a replacement for the Confluence 3 wiki markup editor view.
Wikifier is only a test harness; it is not intended to be a fully fledged application.
I hope this is as useful to you as it is to me.🙂