Re: [xml] newline in xmlTextWriter on win32


  I'm having difficulty with newlines ("\n") using xmlTextWriter on
Windows.  Instead of writing CRLF to the given output file as is the
windows convention, the text writer is outputting LF (\x0A) alone.  This
happens both when the newline is inserted due to automatic indentation and
when the newline is explicit in an inserted string constant (using
xmlTextWriterWriteFormatString).  I verified that newlines outputed using
fprintf and fwrite to regular files do indeed translate \n into CRLF.  I
poked around very briefly in the libxml2 code, but nothing jumped out at
me as a possible cause.  Does anyohe have an idea as to what could be
causing this problem?
        XML specs defines newline as the ending line character.
If you want CRLF you can write a simple code to have the job done,
or use "unix2dos" command line program.


Lucas Brasilino
brasilino recife pe gov br
Emprel -        Empresa Municipal de Informatica (pt_BR)
                Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]