Hi, Am 15.08.17 um 08:31 schrieb patrickjtray...@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 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.