Hi guys,
I’m trying to test the customModeler. What I’d like to do is to export the custom Modeler diagram to xml file. So I added the download button to this project like the below image. https://github.com/bpmn-io/bpmn-js-example-custom-shapes.
The problem is when I download I’m getting the following issue.
![image](https://forum.bpmn.io/uploads/default/original/2X/8/8132027b674d5e3e189f65a14fdd962c1aa2469c.png)
. Below is the code that I export to xml.
async function downloadXML() {
try {
const { xml } = await modeler.saveXML({ format: true });
const blob = new Blob([xml], { type: 'data:application/bpmn20-xml;charset=UTF-8' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'diagramzzzz.bpmn';
a.click();
URL.revokeObjectURL(url);
} catch (err) {
console.error('Error happened saving XML: ', err);
}
}