Hi,
Am 15.08.17 um 08:31 schrieb
patrick...@gmail.com:
> I simply want the XML files my program outputs to not have newline
> characters escaped into 
. My input XML files contain newlines and I
> want to preserve them.
The 
 is the XML entity for LF. This is correct XML which contains
exactly what you put into it:
<Content><Elt>line 1
line 2</Elt></Content>
Any XML parser will be able to handle the LF. For example, xmllint does:
> $ xmllint -format content.xml
> <?xml version="1.0"?>
> <Content>
> <Elt>line 1
> line 2</Elt>
> </Content>
So there is no but that needs to be fixed.
xml.NewEncoder(os.Stdout).Encode() works as expected and produces output
that is valid.
Lutz