Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Draw.io decompress XML Python

17 May 2020 » programming

From https://jgraph.github.io/drawio-tools/tools/convert.html

var diagrams = node.getElementsByTagName('diagram');
data = atob(data);
data = bytesToString(pako.inflateRaw(data));
data = decodeURIComponent(data);
document.getElementById('textarea').value = data;

https://stackoverflow.com/questions/46351275/using-pako-deflate-with-python