Escaping square character in XML
I've created an XML file that contains the "²" character. When viewing the document in Internet Explorer, I get an "Invalid Character" error. Does ² need to be escaped somehow? or is this just an issue with IE8. The a开发者_如何学Cctual bit of XML is shown below:
<Text>ATTENTION INVESTORS & 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>
You should be able to use an HTML entity-style reference (like you did with &
).
I think ²
or ²
should work.
Take a look at the list of encodings here.
精彩评论