2010-11-05 69 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