Given the following xml:
<root>
<child>value</child>
</root>
There are 2 issues when formatting:
- first, and most importantly: there's no way to keep a newline at EOF
- second, formatting is not idempotent: the first time it removes only 1 of the 2 trailing newlines, the second time it removes the remaining trailing newline