和& #xD; [英] Difference between 
 and 

查看:529
本文介绍了
和& #xD;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要解析从不同来源获得的一些text / xml文件。现在,我发现换行符存在一些问题。

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

在某些文件中,我得到
 作为换行符,在另一些文件中,我仅得到& #xD;

现在我们的 Delphi XE 2 的<$ c $有一些问题c>& #xD; ,因此无法正确导入。

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

例如:

1. City&#x0D;&#x0A; State

导入结果:

For example:
1. City&#x0D;&#x0A;State
Result of import:


城市

City
State




  1. City& #xD;& #xA; State

    导入结果:




城市与州


为什么会发生以及如何解决?

Why does this occur and how to solve it?

推荐答案

这两个XML文本之间没有区别。 &#x0D; 指定与& #xD; 相同的字符。对于&#x0A; & #xA; 同样。

There is no difference between these two XML texts. &#x0D; specifies the same character as &#xD;. Likewise for &#x0A; and &#xA;.

您的XML解析器已损坏,解决方案是修复或替换它。

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

这篇关于&amp;#x0D;和&amp; #xD;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆