Search code examples
delphidelphi-xe2line-breaks

Difference between 
 and 


I need to parse some text/xml files I get from different sources. Now I have found some problems with line breaks.

In some files i get 
 as line break, in some others i get only 
.
Now our Delphi XE 2 has some problems with 
, it is not imported correctly.

For example:
1. City
State
Result of import:

City
State

  1. City
State
    Result of import:

City&&State

Why does this occur and how to solve it?


Solution

  • There is no difference between these two XML texts. 
 specifies the same character as 
. Likewise for 
 and 
.

    Your XML parser is broken and the solution is to either fix it or replace it.