Newer Versions of moddle-xml (v. 7.0.0 onwards) support loading of XMLs using the Java Script promise structure. The documentation of the bpmn-js-differ on how to import xml should reflect that.
The readme part on "Reading BPMN 2.0 documents" could e.g. be updated to something along the following lines:
Load diagrams using bpmn-moddle:
import BpmnModdle from 'bpmn-moddle';
var oldDefinitions, newDefinitions
try{
oldDefinitions = (await new BpmnModdle().fromXML(a)).rootElement;
newDefinitions = (await new BpmnModdle().fromXML(b)).rootElement;
} catch(err){
console.log('something went wrong', err);
}
Thanks for reporting this one! You already suggested some changes, mind you creating a Pull Request which solves the problem? We're open for contributions 🚀
Newer Versions of moddle-xml (v. 7.0.0 onwards) support loading of XMLs using the Java Script promise structure. The documentation of the bpmn-js-differ on how to import xml should reflect that.
The readme part on "Reading BPMN 2.0 documents" could e.g. be updated to something along the following lines:
Load diagrams using bpmn-moddle: