Bugs item #664094, was opened at 2003-01-07 16:28
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=664094&group_id=16035

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: XMLWriter formatting errors when whitespace trimming enabled

Initial Comment:
The protected method writeElementContent() of XMLWriter
does not properly concatenate adjacent text nodes
together and results in lost text nodes in some cases.
 A workaround was created by extending the XMLWriter
class and implementing a fixed version of
writeElementContent() method.  The fix is shown below:

Old code:
                    else {
                        buffer = new StringBuffer(
lastTextNode.getText() );
                        buffer.append( ((Text)
node).getText() );
                    }
New Code:
                    else {
                        if (buffer == null)
                            buffer = new StringBuffer( lastTextNode.getText() );
                        buffer.append( ((Text)
node).getText() );
                        lastTextNode = (Text) node;
                    }

Thanks!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=116035&aid=664094&group_id=16035


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to