DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21404>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21404 Serialization of tags with long text inserts line break and indentation! ------- Additional Comments From [EMAIL PROTECTED] 2003-08-15 13:30 ------- This is the behavior that happens when you call setIndenting(true) and leave setPreserveSpace() as false. (According to bug 9793 you shouldn't have them both set to true.) The result leaves your text content mangled. This is a pretty ugly problem - if you want your XML to be pretty-printed, then your text content will get mangled. I was able to work around this problem by extending XMLSerializer add adding these overrides, so that printText() was never called with preserveSpace equals false. protected void printText( String text, boolean preserveSpace, boolean unescaped ) throws IOException { // set preserveSpace to true, no matter what we were called with. super.printText( text, true, unescaped ); } protected void printText( char[] chars, int start, int length, boolean preserveSpace, boolean unescaped ) throws IOException { // set preserveSpace to true, no matter what we were called with. super.printText( chars, start, length, true, unescaped ); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
