Do not strip \n from XML field on out.put()

Skip to first unread message


Jun 29, 2021, 5:22:30 AMJun 29
to Bots Open Source EDI Translator

for the German XRechnung format it is necessary to have a line break (\n) at the end of a XML field.

The payment terms have to be stated like this now since XRechnung version 2.0.1:
Screenshot 2021-06-29 111706.png

Before (<= XRechnung 2.0.0) this was fine:
Screenshot 2021-06-29 111831.png

Unfortunately Bots automatically strips \n from the string in out.put().
Is there any way to prevent that?
Or do I have to create a routescript (postprocessing) for every XRechnung route (I have a lot of them)?

Thanks in advance!

Best regards

Henk-Jan Ebbers

Jun 29, 2021, 2:01:13 PMJun 29
there is no such switch.
so it is not a default option to do this.....might be that postprocessing is an option.
(who in heavens name makes cr/lf significant in edi?)
kind regards,
Henk-Jan Ebbers

You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit


Jun 30, 2021, 10:37:16 AMJun 30
to Bots Open Source EDI Translator
The German government does, or rather the guy there who is responsible for the XRechnung specifications. 🤷‍♂️

Anyhow, I will use a simple postprocess then.

Thanks & best regards

Eppye Bots

Jun 30, 2021, 12:02:41 PMJun 30
to 'Chuck Turco' via Bots Open Source EDI Translator
so....what is he going to do with the CR/LF ?

kind regards, Henk-Jan Ebbers


Jun 30, 2021, 12:47:20 PMJun 30
to Bots Open Source EDI Translator
Basically nothing I would say.

The background is the specification of the field PaymentTerms>>Note which can contain one or multiple skonto payment terms in this format (as you saw in the screenshots of my first post):

The specification says (freely translated by me):
"Each skonto term starts with a #, the single parts of the skonto term are separated with a # and each skonto term ends with a #.
At the very end of a complete skonto term needs to be a XML compliant line break"

According to the wording of the specification there needs to be a line break even if it is technically totally unnecessary.
And with the newest version of the official validator application released alongside the updated 2.0.1 specification this is now also strictly checked and hence I needed to change it.

The PaymentTerms>>Note field is totally stupid anyhow in my opinion because why would you not just do somethink like this?!


This would make much more sense in a XML format.

Best regards


Jul 9, 2021, 2:40:18 AMJul 9
to Bots Open Source EDI Translator
Hi Alexander

Understand that this was a free translation, but assume that "XML Compliant line Break" is really what is stated in German, then a \n is not correct, but you should put in &#13; instead. Check here:
I have not tried it to write this in BOTS yet, but when consuming XML and line breaks are important for whatever reason, then I do enforce this practice with sending systems and BOTS handles them correctly on incoming.

Reply all
Reply to author
0 new messages