XML have five special character which had been used to express document structure ,just as < ,> ,& ,",'. If you want use those special character ,you need use other special expression .For XML resolver can read those character,this have two way to solve the problem.
One way is that you can use escape character to replace those character . I list escape character at below.For example , "<" can be replaced by "& lt;" ,">" use "& gt;" ,"&" use "& amp;" , """ use "& quot;" ,"'" use "& apos;" .The importantly,please not forget the end character of ";".
The other way ,you can use two word to surround your special character . For example , in front of sentence add word "<![CDATA[" ,and at the end of sentence add word "]]>" . So you avoid escape character to replace your special character one by one , you can use this way to surround many special character for XML.
XML special character dispose
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- Correctness AdapterViewChildren Summary: AdapterViews can...
- PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...