Hi,

Yes, I've come across this problem myself. First, I assume you are
having this problem under windows. Second, you are probably saving the
file in text mode.

If the above 2 assumptions are correct, then do the following: save to
file in binary mode. The output you are saving more than likely already
has \r\n [0d][0a] characters in it, meaning, it should not be saved in
text mode but in binary. Text mode converts each \n to \r\n ([0d][0a]),
resulting in \r\r\n. Welcome to the wonderful world of windows carriage
return line feeds.

If you really want to be safe do the following: Scan the output for \r\n
sequences, if the output has it - save in binary mode, else save it as
text mode.

Cheers,

Hans
 
-----Original Message-----
From: Ovanes Markarian [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 13, 2007 9:26 PM
To: xalan-c-users@xml.apache.org
Subject: FormatterToXML extra line feed

Hello *,

I use in my app Xalan SVN Head revision. In my case I initialize
XalanStdOutputStream,
XalanOutputStreamPrintWriter, FormatterToXML to output xml into the
file. PrintWriter is
initialized with StdOutStream, and FormatterToXML is initialized with
PrintWriter.

The problem which I encounder is that the resulting XML file contains
extra line feeds in hex 0D
OD 0A is it a bug or some kind of a setting which I did not find in the
docs?




With Kind Regards,

Ovanes Markarian



-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.30/1127 - Release Date:
12/11/2007 21:19


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.30/1127 - Release Date:
11/12/2007 9:19 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.503 / Virus Database: 269.15.30/1127 - Release Date:
11/12/2007 9:19 PM
 

Reply via email to