|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Woodstox improvement with line feeds.Hello, This question is regarding the improvement made from 3.1.2
to 3.2.6 regarding optimization. Particularly the way line feeds are handled. Using the XmlWriter, I output to a file and originally there
would be no extra character at the end of the line, while now, in 3.2.6 there
is a 
 Is there any way of not writing this out? Or would the
option be to move back to 3.1.2? Thanks Dave |
|
|
Re: Woodstox improvement with line feeds.On Thu, Jul 17, 2008 at 1:41 PM, Dave Found <dfound@...> wrote:
> Hello, > > > > This question is regarding the improvement made from 3.1.2 to 3.2.6 > regarding optimization. Particularly the way line feeds are handled. > > Using the XmlWriter, I output to a file and originally there would be no > extra character at the end of the line, while now, in 3.2.6 there is a > > Is there any way of not writing this out? Or would the option be to move > back to 3.1.2? No need to revert back to 3.1.x. :-) This was a fix added to 3.2: http://jira.codehaus.org/browse/WSTX-94 (rationale being that if \r is output as is, it gets converted by xml parser to \n, unless it's escaped. With 3.1, \r was output as is, with 3.2 it is by default escaped) So: to disable quoting, you can set property WstxOutputProperties.P_OUTPUT_ESCAPE_CR to Boolean.FALSE. The reason for default being 'true' is that this is how other xml processing packages do it (AFAIK; Xerces DOM, XOM). I am not sure what is the best default, personally; most of the time I personally would expect it to be left as is... Hope this helps, -+ Tatu +- ps. I think I'll add this to FAQ -- I would appreciate suggestions for additional things to add (and especially help in writing FAQ entries!) --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: Woodstox improvement with line feeds.Thanks very much, as for a FAQ entry:
Is it possible to remove extra character from being written, such as line-feed ( )? Yes. To disable quoting, you can set the property WstxOutputProperties.P_OUTPUT_ESCAPE_CR to Boolean.FALSE. This also disables .... (whatever else it disables). Thanks again. Dave -----Original Message----- From: Tatu Saloranta [mailto:tsaloranta@...] Sent: Thursday, July 17, 2008 7:11 PM To: user@... Subject: Re: [woodstox-user] Woodstox improvement with line feeds. On Thu, Jul 17, 2008 at 1:41 PM, Dave Found <dfound@...> wrote: > Hello, > > > > This question is regarding the improvement made from 3.1.2 to 3.2.6 > regarding optimization. Particularly the way line feeds are handled. > > Using the XmlWriter, I output to a file and originally there would be no > extra character at the end of the line, while now, in 3.2.6 there is a > > Is there any way of not writing this out? Or would the option be to move > back to 3.1.2? No need to revert back to 3.1.x. :-) This was a fix added to 3.2: http://jira.codehaus.org/browse/WSTX-94 (rationale being that if \r is output as is, it gets converted by xml parser to \n, unless it's escaped. With 3.1, \r was output as is, with 3.2 it is by default escaped) So: to disable quoting, you can set property WstxOutputProperties.P_OUTPUT_ESCAPE_CR to Boolean.FALSE. The reason for default being 'true' is that this is how other xml processing packages do it (AFAIK; Xerces DOM, XOM). I am not sure what is the best default, personally; most of the time I personally would expect it to be left as is... Hope this helps, -+ Tatu +- ps. I think I'll add this to FAQ -- I would appreciate suggestions for additional things to add (and especially help in writing FAQ entries!) --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free Forum Powered by Nabble | Forum Help |