Srinivas Maram writes:
[cut]
|
| OutputFormat outformat = OutputFormat.createPrettyPrint();
| //outformat.setTrimText(false);
|
| And when I uncomment the line above, it retains the value in the element
| text but keeps adding more white spaces and indentation everytime I save
| the same file.

Perhaps we should allow for text being trimmed when reading in?
Something along the lines of 
http://dom4j.org/apidocs/org/dom4j/io/SAXReader.html#setStripWhitespaceText(boolean) 
but controlling the trimming behaviour?

Then we could claim idempotence: T(T(x)) = T(x)
where x is any admissible xml document and T is the transformation
of reading the doc in and writing it out unchanged. This is a reasonable 
requirement for any roundtripping application, IMO.

Jan



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
dom4j-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to