When i parse a xml document by jdom, i found that some ‘\r’ characters were lost in Document object.
for instance:
aa\r\nbb
After parsing it, i find that the property ‘text’of Element ‘b’ is ‘aa\nbb’.
Does anybody knows why the original ‘\r’ is lost. Any suggestion appreciated.
Thanks.
The xml spec requires that line endings are normalized to \n by the parser, see the section on line endings