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 Champion 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
Posted Friday in United States

Confluence Security Advisory

Good morning Members, Not sure if you are aware. Please read the following: More details: https://co...

43 views 1 0
View post

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you