How to get the XML from mxGrpah diagram?
Pointed index.html from mxGraph diagram sample Able to draw the diagrams using editor Enabled local storage Able to get the XML from local storage Editor.useLocalStorage = true; var temp = localStorage['testing.xml']; console.log(temp); But, I want to get the XML dynamically without using local storage, So I used the code from mxGraph -Save functionality not working locally but it's throwing graph is not defined let encoder = new mxCodec(); let result = encoder.encode(graph.getModel()); let xml = mxUtils.getXml(result); Code: <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" >