How to modify XML tag names?


Hey everyone,

I’m new to bpmn-js. I found it’s an awesome lib and I’ve spend couple days digging into the source code, but I still have the following question.

The tag generated by default Modeler would be <bpmn2:definitions>, <bpmn2:process>, <bpmn2:startEvent>, etc. However, I would like to remove the “bpmn2” namespace from the tag, so that the tags become <definitions>, <process>, <startEvent>, etc. Does anyone know how to achieve this?

Many thanks!


I use bpmn-js since few day so I can make mistake

I think you can’t just remove the namespace because it is often (always?) writting in block (like “bpmn:BaseElement”, I don’t know how to say in english)

so I think you have to remove all the namespaces in bpmn-js,

however in bpmn-moddle/resources/bpmn/json/bpmn.json there is

“prefix”: “bpmn”,
“xml”: {
“tagAlias”: “lowerCase”,
“typePrefix”: “t”

maybe you can do something with this.