Oxygen XML Author allows you to set the whitespace property to -oxy-trim-when-ws-only, meaning that the leading and trailing whitespaces are removed.