XML export to DITA xml
Asked by shilpa shilpa:

Hi,

I used the Export to XML option in confluence and exported a page. I somehow figured out that the content gets stored in the entities.xml file. But, I want the content to show up correctly in the DITA format, ie, display the content in the Oxygen XML Author mode correctly.

Can anyone help me please? Thanks.


Answers:
author: Stephen Sifers
body: Hello Shilpa and welcome to the Community!

To understand more about what you're attempting to do with the XML export of Confluence we would need a bit more clarification. Could you please provide additional information on your workflow you're wanting to apply to the XML export of a Confluence page?

Your workflow would allow us to know why and how you're approaching the export along with giving us an idea of what your desired outcome would be or used for.

We look forward to your response so we may assist with ensuring you have a direction to go with this.

Regards,  
Stephen Sifers

comments: author: shilpa shilpa
body: Hi Stephen,

Thank you for such a warm welcome :)

We have the content in confluence pages and want to export this into DITA supported XML format. I tried various options and the following seems to work -

1) Export the confluence page in HTML format.

2) Open the HTML file in Oxygen.

3) Fix the tag issue and use XHTML to DITA transformation scenario.

4) XML file gets generated and it would need some cleanup for structure. I tried a page and I got the XML file which had lists outside the section tags, which I had to move manually.

This works when we have less number of pages to convert. Just curious to know, if there is any other better way to achieve this with less number of errors after using transformation.


author: Stephen Sifers
body: Hello Shilpa,

Thanks for following up and clarifying what you're wanting to do with the XML export.

Your idea of wanting to use DITA with the XML formatted export is a good idea and you do have an interesting case. There was a feature request submitted a while ago about wanting a similar functionality. Unfortunately, that feature request was resolved as "Won't Fix." You can find that request at [CONFSERVER-5571](https://jira.atlassian.com/browse/CONFSERVER-5571).

Another option you have available would be to use the REST API which will give you the content of a Confluence page in a JSON format. This would allow you to programmatically export that JSON format into any other format you wished. You could find out more about the REST API at [Confluence REST API Documentation](https://docs.atlassian.com/ConfluenceServer/rest/6.14.1/).

Additionally, you could also review the Atlassian Marketplace to see if there are any add-ons which would bring in the functionality you're looking for. You can find the marketplace at [Atlassian Marketplace](https://marketplace.atlassian.com/).

I hope this gives some guidance on formatting the data in a way that works for your workflow along with providing a few options.

Regards,  
Stephen Sifers


author: shilpa shilpa
body: Thank you.


author: jpoduru
body: Hello Shilpa ,

Did you get any pointers ? We are also trying to achieve something simillar.


author: shilpa shilpa
body: Hi,

For now, we plan to use the HTML to DITA conversion. The output seems to be ok with some structural errors.


Tags: atl-adm