Bugs item #619415, was opened at 2002-10-07 00:57 Message generated for change (Comment added) made by maartenc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=619415&group_id=16035
Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Peter Snow (absnom) >Assigned to: Maarten Coene (maartenc) Summary: HTMLWriter problem with carriage returns Initial Comment: HTMLWriter does not appear to output text nodes whose content contains DOS-type line feeds - <cr><lf>. For example, take the following simple HTML file: <html> <body bgcolor="#ffffff"> <div ID="test"> Mary had a little lamb. </div> <br/> <a href="testURL">Test URL</a> Hello, this is a test. </body> </html> If this file is created using a Windows text editor, then read in with a SaxReader and the resulting Document object is written out to a file using HTMLWriter, both "Mary had a little lamb" and "Hello, this is a test." are not written out to the file. If you change the end-of-line characters to Unix-style <lf> only, the lines are written out. XMLWriter does not appear to have the same problem. ---------------------------------------------------------------------- >Comment By: Maarten Coene (maartenc) Date: 2004-06-18 16:31 Message: Logged In: YES user_id=178745 I couldn't reproduce your problem anymore, it has probably been fixed already since this issue has been reported a very long time ago. I've added a test-case to TestHTMLWriter which verifies your problem. Maarten ---------------------------------------------------------------------- Comment By: Peter Snow (absnom) Date: 2002-10-07 01:27 Message: Logged In: YES user_id=624383 Just to add that the OutputFormat used with HTMLWriter is the one created with OutputFormat.createPrettyPrint() or using the default HTMLWriter constructor. A workaround is to pass a formatter to HTMLWriter that is created with "new OutputFormatter("", false)", that is setting "newlines" in the formatter constructor to false. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=619415&group_id=16035 ------------------------------------------------------- This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND _______________________________________________ dom4j-dev mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-dev