It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is it possible to create a table from xml data in a confluence page automatically?

Hi there, I'm an apprentice in his 4th year (programming with C#) and new to confluence. I need some help or hints how to approach this problem. I barely found something on this matter so I decided to drop a question here. The plan is to delete the current table, read the new data from a xml file and create a new table from its tags and values in a confluence page automatically.

Here's an example what it could look like.

image2016-3-22 9:31:56.png

If possible, I'd like to do this with C# but other approaches are welcomed too smile

3 answers

1 accepted

0 votes
Answer accepted

There are a number of different approaches to be able to achieve this. I outline a few below.


Thanks a lot, I'm currently going with the REST API.


So, one thing to consider is if you are pushing the new data into Confluence or pulling the new data from Confluence.

To push the data to Confluence, I think Phill's suggestion of using the REST API is the right direction to go.  You can even write the sending client in C#.

To pull the data from Confluence, you will need a plugin.  Be warned that the published documentation on writing plugins is a minefield of bad information.  For example, the tutorial on "creating a new confluence macro"  does not work with the latest Atlassian SDK.  Once through the overhead of creating a plugin - writing one to pull the xml and drop it into a Confluence table would not be hard.

0 votes
Steven Behnke Community Leader Mar 21, 2016

I have written numerous scripts in python or javascript that pull the content of a page, modify it, and then store the page back. It's not a particularly difficult task. For instance, a script that pulls the current page, parses for a specific macro, and modifies and stored the page into a duplicate was under 150 lines of javascript.

You should not be doing this by hand – There is likely a library out there you can use to send and consume JSON packages. There should be a library out there that you can use to write and slurp XML/HTML formatted content.

A great place to start is the page source editor add-on:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Off-topic

Run into these Solution Partners at Atlassian Open

Hey there Community! Atlassian Open is kicking off in less than a month and we can't wait to touch down in Vienna, Sydney and Boston. This is an opportunity to create the future of teamwork with ...

83 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you