danielsss / embed-viewer

This tool is used for converting XMind file to html and view pages via Github.
MIT License
16 stars 9 forks source link

recommended steps to read xmind 2022 content? #4

Open slave2sync opened 2 years ago

slave2sync commented 2 years ago

I am struggling with reading the content of XMind 2022 workbook files using C++ and can't figure out how to do this. In XMind 8 contents were just zipped - all you had to do is to unzip them and parse them (with a DOM parser for example). Could you please indicate how to read the new files? Any hints will be really appreciated

danielsss commented 2 years ago

@slave2sync I'm not sure what the contents of XMind 8 are, but the new *.xmind is composed of a couple of JSON and media files. Have you attempted to treat them as JSON objects?

slave2sync commented 2 years ago

@slave2sync I'm not sure what the contents of XMind 8 are, but the new *.xmind is composed of a couple of JSON and media files. Have you attempted to treat them as JSON objects?

Thanks for your reply!. I will try to describe what was there XMind8 workbooks have two XML contents: 'content.xml' and 'comments.xml' within compressed (zipped) text

You then convert the unziped 'content.xml' text to a DomDocument using the 'xmap-content' named item Following this all sheets within the DomDocument have each a Node Name equal to 'sheet' and under those nodes there were 'title' Nodes

I am not sure what to do with the new format. Should I first unzip it? Is it compressed? Or should I try to decode it first (i think the content is encoded) ? What would you do in pseudo code? :) Any help is greatly appreciated!!

danielsss commented 1 year ago

@slave2sync I've checked the new format. Of cause, you need to unzip them first and after that, you will have a couple of files that one of them named content.json(I guess this is what you want to read).

slave2sync commented 1 year ago

@slave2sync I've checked the new format. Of cause, you need to unzip them first and after that, you will have a couple of files that one of them named content.json(I guess this is what you want to read).

I managed to read the content.json after unzipping. Many thanks for all your time!