Confluence XML
![]() | Filter stream extension to parse a Confluence XML package |
Type | JAR |
Developed by | |
Active Installs | 192 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Filter module used to read a Confluence XML package. Allow for example to import it into an XWiki instance.
In an XWiki instance it's generally used through Filter Streams Converter Application which needs to be installed separately. Select it as input module and select the output module you want (the instance module to import the confluence package in the current instance for example).
Tutorial
To get started with the Confluence Import, you will need to install the Filter Streams Converter Application and this Confluence XML module. You can install these apps using the Extension Manager.
You then need to export your confluence data from the Confluence administration and upload the zip file to the XWiki server. Make sure you make it accessible to the user running your java process.
After you have installed the two extensions, click on the Filter Stream Converter entry from the Applications panel.
Follow these steps on the screenshot below:
- Choose the "Confluence XML input stream (confluence+xml)" input type
- Fill in the source field which contains "file:" followed by the path of the Confluence zip file, located on the machine where XWiki is running
- Choose the "XWiki instance output stream (xwiki+instance)" output type to import the Confluence pages in your wiki
Note: in some cases, the Java Application server cannot access all the directories from your computer or server. You can try storing the file in a directory used by the application server (root directory of the application server or log directory). Alternatively it is also possible to make your file accessible on a web server and indicate the URL of that file.
After you have completed these steps, click the "Convert" button. After that, you will see the conversion progress. For example:
For example with the following initial page from Confluence:
You'll get the following page in XWiki after you've made the import:
You're all set!
Where is my Confluence hierarchy ?
Confluence has a parent/child relationship based hierarchy which is what XWiki used to have too and what this extension is producing. But in recent versions of XWiki this parent/child relationship is hidden and visually replaced by a path based hierarchy (see https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/ContentOrganization/NestedPagesMigration/ for more details). The extension would need to be improved to automatically convert to this new system by default, see https://jira.xwiki.org/browse/CONFLUENCE-9.
In the meantime the possible workarounds are:
- using Nested Pages Migrator Application after the import to convert the hierarchy
- switch back to the old parent/child hierarchy but it's not recommended since you might break more and more things which expect the new hierarchy system by default
Macro Conversion
The following macros are converted automatically:
- anchor : converted to an id macro
In addition the importer converts the Confluence macro syntax to the macro syntax for the default syntax defined in your XWiki instance. It can happen (by luck) that it would match an XWiki macro of the same name but otherwise an error message will appear saying that the macro cannot be found. You then have several choices:
- Edit the page and manually select an existing XWiki macro to use.
- Create a macro of the same name.
Macro Equivalents
This section is meant to help user pick the closest existing macro in XWiki to match Confluence ones.
- <add here>
Extending Macro Conversion
You can implement a MacroConverter XWiki Component that will we used by this Confluence importer when performing the macro conversions. For that you need to write a component which implements the org.xwiki.contrib.confluence.filter.MacroConverter with a component hint named after the confluence macro id you wish to convert automatically.
Release notes
Release notes can be found on Confluence project page.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Dependencies
Dependencies for this extension (org.xwiki.contrib.confluence:confluence-xml 9.4.4):
- org.apache.commons:commons-compress 1.12
- commons-configuration:commons-configuration 1.10
- org.xwiki.commons:xwiki-commons-filter-xml 8.4
- org.xwiki.platform:xwiki-platform-filter-event-model 8.4
- org.xwiki.platform:xwiki-platform-filter-event-user 8.4
- org.xwiki.platform:xwiki-platform-model 8.4
- org.xwiki.contrib.confluence:confluence-syntax-xhtml 9.4.4
- org.xwiki.contrib.confluence:confluence-syntax-confluence 9.4.4
- org.xwiki.rendering:xwiki-rendering-syntax-xwiki21 8.4