Sign up for our free webinar Visualize it: The Secret of High-Performing Teams

Sign up for free webinar

Extracting the XML from mxfiles

Categories: feature

The default format for saving diagrams was changed some time ago from raw XML to XML compressed using standard deflate.

The default format for saving diagrams was changed some time ago from raw XML to XML compressed using standard deflate. The main reason for this was that when Google’s server are struggling a compressed file has a much better chance of writing. That said, the raw XML may be useful to see how the diagram is constructed. When you look at a compressed draw.io XML file, you’ll see something like the following (the grey highlighted text is your actual diagram data):

The part between the tags is compressed with the standard deflate process. You can copy and paste that into https://jgraph.github.io/drawio-tools/tools/convert.html, press Decode and you’ll get the raw XML back:

Edit the XML code in the draw.io editor

If you don’t want to use the extra inflate/deflate tool, you can also see your diagram’s XML code and edit it directly, or to copy it into a text editor. Click on Extras > Edit Diagram to view and edit your diagram’s XML code.

Share this story

Experience the power of draw.io

How would you like to explore?

draw.io Digest – Subscribe to our Newsletter

Yes, I would like to receive the draw.io for Confluence and Jira newsletters, whitepapers, the latest blog posts, and announcements. (You can unsubscribe at any time.)

For more information about our data usage, please refer to our privacy policy.

Here you will find an overview of all cookies used. You can give your consent to whole categories or display further information and select certain cookies.