XML comments and Delphi XMl Data Binding
Have anybody had a isse with comments <!--´comment --> and XML data binding in delphi. Im tryng to load the xml with the wizard but im getting error. XML looks like this:
<!-- For more info go: https://www.energia.ee/et/home/electricity/rates -->
<settings>
    <!-- Electrical energy basic rate (Elektrienergia põhitariif) -->
    <electrical_basic_rate>3.19</electrical_basic_rate>
    <!-- Network service basic rate (Võrguteenuse põhitariif) -->
    <ne开发者_JAVA技巧twork_service_basic_rate>4.13</network_service_basic_rate>
    <!-- Renewable energy charge (Taastuvenergia tasu) -->
    <renewable_energy_charge>0.61</renewable_energy_charge>
    <!-- Electricity excise tax (Elektriaktsiis) -->
    <electricity_excise_tax>0.447</electricity_excise_tax>
</settings>
I get error on the 3-d line. Error message looks like this:

Strange is that the first comment is not giving a error. Looks like a Delphi XE bug to me..
It's actually broken because of this õ character, I changed them all to o and it worked.
I added <?xml version="1.0" encoding="UTF-8"?> the converted the file from ANSI to UTF-8
and it worked as expected, with the õ character.
It also works with out the encoding line if you use a UTF-8 Encoding instead of ANSI
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论