首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无效的XML:行出错。实体名称必须紧跟在实体引用中的'&‘后面

无效的XML:行出错。实体名称必须紧跟在实体引用中的'&‘后面
EN

Stack Overflow用户
提问于 2015-04-29 05:22:47
回答 1查看 557关注 0票数 0

我正在尝试将此文件上传到iTunes,但我总是收到相同的错误。在这一点上,我甚至没有任何&,当我通过W3School的验证器运行它时,它说一切都很好。

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>

<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">

<channel>
<title>The Regulars</title>
<link>http://theregularspodcast.tumblr.com/</link>
<language>en-us</language>
<copyright>The Regulars, 2015</copyright>
<itunes:subtitle>EP1 Paying for butts and RIP Konami</itunes:subtitle>
<itunes:author>The Regulars</itunes:author>
<itunes:summary>Christopher and Matthew talk about mostly video game news. Sometimes we talk about other stuff too.</itunes:summary>
<description>WHAT IS GOING ON AT KONAMI, WHY DOES A HORSE BUTT COST £60</description>
<itunes:owner>
<itunes:name>The Regulars</itunes:name>
<itunes:email>theregularsforgiven@gmail.com</itunes:email>
</itunes:owner>
<itunes:image href="https://dl.dropboxusercontent.com/u/56667917/logo.png" />
<itunes:category text="Games and Hobbies">
<itunes:category text="Video Games"/>
</itunes:category>

<item>
<title>EP1 Paying for butts and RIP Konami?</title>
<itunes:author>Matthew Starkey</itunes:author>
<itunes:subtitle>Episode 1</itunes:subtitle>
<itunes:summary>Chris and Matthew talk about the recent paid mods feature on steam, what is going on with Konami and other related topics</itunes:summary>
<enclosure url="https://dl.dropboxusercontent.com/u/56667917/The%20Regulars%20-%20EP%201%20-%20Paying%20for%20Anuses%20and%20RIP%20Konami.mp3" length="122341985" type="audio/mpeg" />
<guid>https://dl.dropboxusercontent.com/u/56667917/The%20Regulars%20-%20EP%201%20-%20Paying%20for%20Anuses%20and%20RIP%20Konami.mp3</guid>
<pubDate>Wed, 29 April 2015</pubDate>
<itunes:duration>1:03:43</itunes:duration>
<itunes:keywords>video games aoncefreeman forgivenpast the regulars skyrim valve steam konami hideo kojima metal gear solid silent hills paid mods</itunes:keywords>
<itunes:explicit>yes</itunes:explicit>
</item>


</channel>
</rss>
EN

回答 1

Stack Overflow用户

发布于 2015-05-03 18:41:50

根据official iTunes podcast specs的规定,“游戏和爱好”这一类别必须在RSS feed中包含一个等同于“&”的HTML实体。在您的特定情况下,使用单词"and“而不是”与“并不对应于任何现有的iTunes类别(因此,iTunes中的错误)。只需将其替换为:

代码语言:javascript
复制
  Games &amp; Hobbies

此外,考虑到视频游戏是游戏和爱好的子类别,因此在播客RSS提要中iTunes类别标签的正确sintax是:

代码语言:javascript
复制
<itunes:category text="Games &amp; Hobbies">
<itunes:category text="Video Games" />
</itunes:category>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29930180

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档