8

I'd like to programmatically generate a draw.io map diagram from nested XML/JSON exported from Zotero (individual items nested in sub-collections and collections).

I already have the basic JSON/XML, which can be adapted to draw.io's format, but I'm not clear how. There seems to be no schema for the app's diagram format, and the source XML of existing diagrams includes a lot of style and layout information that I want to avoid having to calculate -- I am assuming, given that the Layout option in the app is automatic, that there must be a way to automatically render a diagram without having to include manually-specified style/layout info.

So I have three questions:

  1. Is there a standard XML/JSON scheme for hierarchical draw.io map diagrams?
  2. Is it possible to give draw.io just the relationship info between elements, and have it determine the layout automatically (akin to the automatic Arrange > Layout options within the app)?
  3. Within a draw.io map, can a node be connected to more than one parent?
2
  • 2
    Try CSV import instead, about.draw.io/… , about.draw.io/import-from-csv-to-drawio Commented Sep 26, 2019 at 21:18
  • 1
    Hi @melat0nin have you managed to find solution? I am also woke up with idea of automatically generating XML files and then sending them to draw.io to get it rendered. Looking for best solution for this idea ...
    – Almazini
    Commented Oct 8, 2019 at 9:00

2 Answers 2

4

I've created a converter from json to drawio format. It does not work with nested collections now, but it may help anyway. https://github.com/Voravomas/drawio_diagram_converter

2
  • How did you solve the automatic layout issue?
    – Mig82
    Commented Jun 19, 2022 at 7:36
  • @Mig82 Seems that draw.io alligns them automatically
    – Voravomas
    Commented Jun 20, 2022 at 7:52
1

How about this VS Code extension? https://github.com/hediet/vscode-drawio

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.