android - XML格式不正确( token 无效)

标签 android xml compiler-errors href

为什么会出现错误?

\n<a href="https://www.facebook.com/midberg.ung?ref=ts&fref=ts">Upplýsingar um Miðberg</a>

这是不接受链接的android应用程序的字符串

最佳答案

&符被解释为转义符。当在XML或HTML流中看到&符号&时,应在其后跟随几个定义的实体之一。
在这种情况下,您需要通过替换&amp;来逃避&符号本身,即,转义符,&符号实体和结尾的分号。

关于android - XML格式不正确( token 无效),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22900105/

相关文章:

android - 如何设置广告尺寸?

php - 从外部页面获取div,然后从中删除另一个div

visual-studio - Visual Studio Express的: fatal error c1060, the compiler is out of heap space

maven - gradle构建和pom解析问题

Android:ViewPropertyAnimator 枢轴

android - 实现 SeekBarPreference

android - 显示进度条,直到服务器返回响应

c# - 在 XML 反序列化中使用继承

php - 如何为 DOMDocument XML 的每个元素添加引号以保存在 MySQL 数据库中

ios - NSInvalidArgumentException : unrecognized selector sent to instance