当我跑 http://www.virtualfestivals.com/syndication/rss/news.rss.xml通过 http://validator.w3.org/feed/我收到错误信息
Undefined item element: content (20 occurrences)
<content><![CDATA[<p>While their virtuoso musici...
但是,根据 http://validator.w3.org/feed/docs/howto/declare_namespaces.html , 我声明命名空间
xmlns:content="http://purl.org/rss/1.0/modules/content/"
在开始时有没有人有任何指示?我很困惑!
[更新]
当我尝试使用
encoded
时正如建议的那样,创建 RSS 时发生错误。我正在使用 XSL 和 ColdFusion。没什么大不了的,当我添加
encoded
时它会中断部分。作品:
<content><xsl:value-of select="maintext" /></content>
不工作:
<content:encoded><xsl:value-of select="maintext" /></content:encoded>
最佳答案
你声明它,但你从不使用它。正确的标签名称是 encoded
.
<content:encoded><![CDATA[<p>The band...
关于xml - RSS 提要无效。未定义的项目元素 : content,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6812646/