prowide / prowide-iso20022

Comprehensive business model and parser for all ISO 20022 messages
https://www.prowidesoftware.com
Apache License 2.0
145 stars 68 forks source link

Customizable indentation #74

Closed sbublava closed 1 year ago

sbublava commented 1 year ago

AbstractMX.message() ends up calling MxWriteImpl.write() which in turn makes use of XmlEventWriter.

XmlEventWriter always indents by 4 spaces (hard-coded). This is really undesirable due the size restriction of MX messages (100000 characters in our case - don't know if that limit comes from Swift or the messaging software we are using).

Please make this behaviour configurable via MxWriteParams / MxWriteConfiguration or use the indendation settings of the Marshaller used by MxWriteImpl.write() / BusinessAppHdrV02.xml() and so on.

The first option would be better since there is also no easy way to override Marshaller settings in Prowide.

zubri commented 1 year ago

Available in 9.3.6

Now you have an option to change the indentation string. The default is preserved as it was before. We might change that to two spaces by default in the future if we see more use cases for it. For the moment at least you can change it your self via parameter option when you Marshall the model into the XML.

Regards