To remove line breaks from a string you can't use
', ' ')
See http://xmlplease.com/whitespace for more examples.
compiled against libxml2 2.7.8, linked with 20708
compiled against libxslt 1.1.26, linked with 10126
to mean carriage return is performed by the XML parser, but the arguments to xmlstarlet's sel and ed subcommands are just plain strings, not XML. If you want a newline pass a newline:
# in bash
$'translate(comment, "\n", " ")'
# in powershell.exe
"translate(comment, '`n', ' ')"
:: in cmd.exe
"', ' ')"