Android XML解析错误(无效令牌,格式不正确)

布莱普

在android studio中进行编译时,以下xml文件中网址中的“&”符号会引发错误。错误是第5-7行(网址行)<DetailPageUrl>格式不正确(令牌无效)。我不知道为什么,我也无法修改网址,因为我需要它。

这是XML

  <?xml version="1.0" encoding="UTF-8"?>
<Items>
<Item>
    <DetailPageURL>
        https://www.amazon.de/Chemie-76128-Felgenreiniger-Alu-Teufel-Spezial/dp/B004LAXG9C?psc=1**&**SubscriptionId=mykey**&**tag=mytag&linkCode=xm2**&**camp=2025&
        creative=165953**&**creativeASIN=B004LAXG9C
    </DetailPageURL>
    <URL>https://images-eu.ssl-images-amazon.com/images/I/412-16OaNFL._SL160_.jpg</URL>
    <Feature>Der neue "Alu-Teufel-Spezial"" ist ein moderner Hochleistungs-Felgenreiniger. Die
        neue, säurefreie Rezeptur ermöglicht die problemlose Reinigung von Stahl- und
        Aluminiumfelgen sowie Radkappen.
    </Feature>
    <FormattedPrice>EUR 13,50</FormattedPrice>
    <Title>Tuga Chemie 76128 Felgenreiniger Alu-Teufel Spezial</Title>

</Item>
</Items>
卡尔文·艾耶(Calvin Iyer)

您需要更换&&amp;在XML文件中。

您可以参考以下链接,获取需要在xml中转义的字符列表:

XML字符转义列表

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

XML文件错误-Android(解析XML错误:格式不正确(无效的令牌))

Android Studio解析XML错误:格式不正确(无效令牌)

Android Studio错误格式不正确(令牌无效)

android上的saxParser有错误(格式不正确(无效令牌))

错误解析XML:格式不正确(无效令牌)

XML格式不正确-Android

错误:(41)解析XML时出错:格式不正确(无效的令牌)+无法解析符号R

xml解析问题:格式不正确(无效的令牌)

安卓。Gradle构建错误:解析XML错误:格式不正确(无效的令牌)

错误:(3)解析XML错误:格式不正确(无效的令牌)

XML解析错误:<id>元素的格式不正确(无效令牌)

错误:(45) 解析 XML 时出错:格式不正确(令牌无效)因为按钮“<<”

解析XML时出错:格式不正确(无效的令牌),而XML恰好很好

XML解析错误:格式不正确

错误:(3)错误:格式不正确(令牌无效)

Xamarin 解析 XML 时出错:格式不正确(令牌无效)

使用GPXPY解析gpx文件会导致格式不正确的无效令牌错误

收到错误“格式不正确(令牌无效)”

AAPT:错误:格式不正确(无效的令牌)

Python错误“格式不正确(无效令牌)”

尝试了解决方案,但没有解决错误:解析XML错误:格式不正确(无效的令牌)

Android - 登录 google AWS Amplify - 模板格式错误:YAML 格式不正确

osm2pgrouting-解析格式不正确的数据(无效的令牌)

React-Native按钮在Android上的格式不正确

Android 日期选择器显示不正确的格式

xml.parsers.expat.ExpatError:格式不正确(无效的令牌)

Python-XML格式不正确(无效的令牌)调试值

xml.etree.ElementTree.ParseError:格式不正确(无效的令牌)

python-xml.etree.ElementTree.ParseError:格式不正确(无效的令牌)