Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Import an xml file into Confluence containing Page Property Macros

Mark Timperley December 5, 2022

I have an xml file that was exported from another application. It contains data I would like to start managing using Confluence (i.e. migrating this data from a rigid application to Confluence, where we can define our own workflow).

I would like to import this file into a Confluence space, creating Page Property Macro tables with the data it contains. This is not practical to do by hand, since I anticipate 100's of pages created from the data in this xml file.

How can I do this? I can write code to read/write/modify the xml file to whatever format confluence would require for import, but I need to understand that format and how to perform the import.

As a proof of concept, I was able to convert the data in the xml file into an MS Word document containing tables and then import that into Confluence, but there is no way to specify Page Property Macros in MS Word, so I had a bunch of tables, but could not build reports with the data using the Page Properties Report Macro. Any suggestions?

1 answer

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2023

I think the only way to do this would be to transform your XML into some that looks like a Confluence space export, and then import it.

The best thing I can think to do is create a new space, edit the new home page, putting the page property macros you want to see on it, and export the space to XML.  You should be able to see the wrappers around the content, and how to embed the macros.

Note that the format can vary by version, so it's worth doing this from the Confluence you are going to import into.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events