XML 如何包含感叹号!在 XML 文本字符串中?转义序列? [英] XML How do you include an exclamation point ! in an XML text string? escape sequence?

查看:63
本文介绍了XML 如何包含感叹号!在 XML 文本字符串中?转义序列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了多种转义序列组合,以在 Android 资源文件夹中的 xml 字符串中添加感叹号 - 无济于事.你会用什么 xml 字符串来帮助!例如?谢谢...

I've tried many combinations of escape sequences to get an exclamation point into an xml string in Android's resource folder - to no avail. What xml string would you use for Help! for example? Thanks...

推荐答案

XML 文件应该接受感叹号,除非可能紧跟在左尖括号之后.

An XML file should accept a exclaimation point, except possibly immediately after a open angle bracket.

如果真的拒绝,你应该可以使用数字实体:Help! = Help!

If it really refuses, you should be able to use a numeric entity: Help! = Help!

或者你可以得到详细的

这篇关于XML 如何包含感叹号!在 XML 文本字符串中?转义序列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆