| Summary: | [Model] the new XMLMemento instance don't have the same elements and texts as the last instance | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Zhang Peng <nemo.zhp> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse, pwebster, remy.suen |
| Version: | 3.3 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
As near as I can see, we do that: DOMWriter uses println(); which is in PrintWriter and uses line.separator It might have to do with how the DOM parser reads the XMLMemento back in and then writes it back out. It must create text nodes for the \n entries when it reads them in, and then when we print it out the second time we use getReplacement(*) and turn \n deliberately into 
 ... But I don't think that writing it a 3rd time and reading it in will add mroe ... just leave the x0A entities there from the first time. PW This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Build ID: M20060921-0945 Steps To Reproduce: 1.create an XMLMemento instance 2.create elements 3.save the instance into .xml file Note: i haven't put textData into the memento, but when i save contents of the memento into the file, the system will put '\n' into the file. 4.close the file 5.create a new XMLMemento instance from the .xml file 6.save the new XMLMemento instance. 7.then strange characters appears in the .xml file: 
 More information: platform independence: automatically put '\n' into the .xml file is nice, but the line separator is 0x0D0A in Windows, and it is 0x0D in Unix, so the fix should be platform independence. we can get this property from System.getProperty("line.separator");