Backport of "xml-formatter: Fix allocation size of buffer" into 1.18
requested to merge tpm/gst-editing-services:backport-mr-250-into-1.18-fix_formatter_save_allocation into 1.18
Backport of !250 (merged) "xml-formatter: Fix allocation size of buffer".
Commits:
- 60856d5a xml-formatter: Write xml directly to file