Skip to content

fix(xmind): open maps saved with XMind 2020 and later - #423

Merged
AndyScherzinger merged 1 commit into
mainfrom
fix/xmind-zen
Oct 22, 2026
Merged

AndyScherzinger merged 1 commit into
mainfrom
fix/xmind-zen

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

Fixes #164

XMind 2020 and later (XMind Zen) store the map in content.json. They still write a content.xml, but it only holds a placeholder map with a warning that the file cannot be opened normally. The XMind plugin only read content.xml, so that warning was all users saw. The comment saying #164 was fixed since 0.0.29 most likely came from testing XMind 8 files, which only have content.xml.

readDocument() now reads content.json when the file has one and falls back to content.xml otherwise. The new processJsonTopic() takes over the same things as the XML path: titles, priority and progress markers, links, and attached child topics. Floating (detached) topics are left out, because the editor allows only one root.

Tested: Vitest cases for processJsonTopic(), and a readDocument() case with a zip that has both content.json and the warning map in content.xml. Vitest, ESLint and the build pass. I have not yet opened a real XMind 2020+ file in a running Nextcloud.

A backport to stable-0.1 follows.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

XMind 2020 and later (XMind Zen) store the map in content.json and only
write a map with a warning message to content.xml, which was all that got
shown. Read content.json when the file has one, with the same titles,
priority and progress markers, links and child topics as before.

Fixes #164

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger added bug Something isn't working AI assisted This PR contains AI-assisted commits labels Oct 21, 2026
@AndyScherzinger AndyScherzinger added this to the v0.2.0 milestone Oct 22, 2026
@AndyScherzinger
AndyScherzinger merged commit 890bd6d into main Oct 22, 2026
8 checks passed
@AndyScherzinger
AndyScherzinger deleted the fix/xmind-zen branch October 22, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Xmind files can't be opened

1 participant