Save XML on button click in React js

I have created BPMN diagram based on bussiness needs. Also am having save button to save the XML of created diagram. On clicking save button I want to get XML of created diagram.
Attached Screenshot for your refference.

Thanks in advance


saveXML is the opposite of importXML. Call it to export the diagram as XML.

can you brief it please.

I have tried below code but not working.


There is no exportXML, as I said, you can use saveXML:

bpmnJS.saveXML().then({ xml } => console.log(xml));
1 Like

Thanks Philippfromme.

Now working, Please provide me clarification for the points given below.

  1. How to integrate in react js web application.
  2. For deployment, Whether separate server is needed to run or can i run in my node js server
  1. Here’s an example:
  2. Not sure what you mean. bpmn-js is a front-end library.