# Edit the diagram XML Underneath the canvas is draw.io XML, and you can edit it directly. That makes bulk changes trivial: rename thirty shapes, restyle everything, or fix something the UI makes awkward. It is also how you paste in a diagram somebody sent you as XML. ![image-20260907-082241.png](https://help.gocapable.com/images/ea52880a-ff88-43ae-8598-a280b28117de.webp) Click Extras → Edit Diagram ![Screenshot 2026-09-07 at 09.22.50.png](https://help.gocapable.com/images/3740d19e-2f01-4c4e-a0eb-1ac945871b08.webp) Paste in the Draw.io XML file --- ## What this is for * Bulk edits that would take a hundred clicks. * Pasting in a diagram supplied as XML. * Debugging a diagram that behaves oddly. --- ## How it works | **Action** | **How** | | ---------------------- | ---------------------------------------------------------------------------- | | Open the XML | Extras, Edit Diagram. | | Replace the diagram | Paste new XML over the existing content and confirm. | | Edit one shape's style | Ctrl+E with the shape selected, which is a smaller version of the same idea. | | Cancel | Close without confirming; nothing is applied. | --- ## A few things that catch people out * Invalid XML is rejected rather than applied, so the worst case is that nothing happens. * Take a copy before a large hand edit. The undo history does not always survive a full replace. * The XML is standard draw.io, so it opens anywhere else too. See [Reference](https://help.gocapable.com/diagrams/reference.html). --- ## Related [draw.io keyboard shortcutsThe dozen that matter.](https://help.gocapable.com/diagrams/draw-io-keyboard-shortcuts.html) [Drafts and recovery in draw.ioSaving is manual, and there is a safety net.](https://help.gocapable.com/diagrams/drafts-and-recovery-in-draw-io.html) [draw.io editorBack to the editor overview.](https://help.gocapable.com/diagrams/draw-io-editor.html) --- _The canvas rewards ten minutes of learning._