Is there a way to preserve CDATA export in XML


Related to this topic, is there a way to preserve the CDATA tags?

CDATA is removed when exporting a diagram

Why would you like to do that? Where did you get a diagram with <CDATA segments from?


Because we have another application that does parsing of the output and it needs to have the <CDATA in as we insert characters that will be tagged by the parser as invalid xml.


So I am using this.modeler.saveXML and I just wonder if there is a switch that you can use something like

this.modeler.saveXML({format: true, preserveCDATA: true}, function(err, xml) {


Generally speaking it should not matter whether to user CDATA or entity encoding.

This makes me wonder: Do we fail to properly encode certain entities? Or is the parser incapable of properly dealing with encoded entities? Please share an example that is invalid XML according to your parser.