Bugs item #1576374, was opened at 2006-10-13 06:17 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1576374&group_id=16035
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Victor (kromo) Assigned to: Nobody/Anonymous (nobody) Summary: SAXContentHandler.characters() is buggy Initial Comment: First, the parameters of this method are named "ch", "start" and "end". "end is misleading it should be renamed to "count". Second, the line cdataText.append(new String(ch, start, end)); should be changed to cdataText.append(ch, start, end); avoiding additional objects is what "StringBuffer" is for. IMHO the "mergeAdjacentText" approach is buggy since http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html#characters(char[],%20int,%20int) says the it "...may return all contiguous character data in a single chunk, or they may split it into several chunks." Which means that dom4j will unknowingly create multiple text nodes even if there is only one in the source XML, because of the implementation of "org.xml.sax.XMLReader " delivering large texts as chunks or buffer boundaries for smaller texts. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1576374&group_id=16035 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev