How to use ESC () character in XML?

倖福魔咒の 提交于 2019-11-29 15:17:15

You cannot ( in XML 1.0). In XML 1.1 there is a slightly larger range of characters you can use, and the characters are expressed differently, but even then,  is 'restricted' (hex it is ) which, as far as I can tell, means that it is not valid XML, even though XML parsers should process it successfully. Note that the 'null' character (�) is never valid. Here's a Wiki article on these characters in XML

You can try forcing the XML document to XML 1.1 and see if your parser will process it successfully.... set the first line of the XML to:

<?xml version="1.1"?>

In fact, I did that, and it works:

<?xml version="1.1"?>
<root>&#27;</root>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!