rene51
April 8, 2019, 1:19pm
1
Hello,
is it possible to change the line encoding when saving a BPMN diagram to XML?
Or is it always the UNIX style?
When I use the following code, a UNIX line encoding ‘n’ is used:
function saveDiagram(done) {
modeler.saveXML({
format: true
}, function (err, xml) {
done(err, xml);
});
}
Is it possible to configure Windows or MAC style line endings, e.g. ‘\r\n’ or ‘\r’ ?
nikku
April 8, 2019, 1:27pm
2
You cannot configure the line-endings, it will always be LF for exported XML.
I’d suggest you to pipe the output through a LF to CRLF converter.
1 Like
rene51
April 8, 2019, 2:03pm
3
Okay, thank you so much for the clarification!
One last question:
Do I have to convert the files back to LF before importing the diagram, or is it always possible to import a diagram, regardless of which line ending is used?
nikku
April 8, 2019, 5:10pm
4
I don’t know. We have been around since 2014 and no-one ever reported a LF / CRFL related issue.
If you’d like the definitive answer I’d suggest you to create a test case that verifies the behavior.
1 Like