How to remove the extensionElements?

Is it correct to remove the extensionElements this way ?

    delete myComponent.businessObject.extensionElements;

or there is another better way to do it?

1 Like

Could you provide a little bit more context to your question?

  • Why would you like to remove the extension elements?
  • When would you like to remove them (during modeling, …)?

I have added extensionElements in bpmn:ParallelGateway and when replace to bpmn:ExclusiveGateway the extensionElements is not required。So I want to remove it.

I think answer qustion by throw a new question to the
questioner is very Rude

This has nothing to do with rudeness. We want to help our users with understanding their specific use case instead of giving simple, generic solutions. Also cf. https://www.thoughtco.com/what-is-the-socratic-method-2154875.