2010-11-05 46 views
1

我创建了一个包含“²”字符的XML文件。在Internet Explorer中查看文档时,出现“无效字符”错误。 ²需要以某种方式逃脱吗?或者这只是IE8的一个问题。 XML的实际位如下所示:以XML格式转义矩形字符

<Text>ATTENTION INVESTORS &amp; DEVELOPERS 
920m² freehold site on 2 titles consisting of vacant land and adjoining buildings. Located within the CBD this is one of the last sites available with frontages on both Marine Parade and Hastings Street, Napier. Zoned inner city commercial. 
Contact agents for details. 
</Text> 

回答

4

您应该能够使用HTML实体样式的引用(像你这样做&amp;)。

我认为&#xb2;&#178;应该工作。请参阅编码列表here

+1

+1'⊃'是一个HTML实体,所以除非你使用的HTML或定义它不起作用。但是,数字“²”或十六进制“²”实体引用将起作用。 – 2010-11-05 02:07:15

+0

好点。我已经更新了一点更清楚。 – 2010-11-05 12:01:45