有效RSS订阅源上的Wordpress RSS错误

时间:2017-10-19 16:02:29

标签: php xml wordpress rss

我遇到了一个非常奇怪的错误让我感到茫然。我在wordpress网站上工作,我试图从RSS源读取但我一直在

  

错误RSS:此XML文档无效,可能是由于字符无效。 XML错误:第12行第8列的标记不匹配

问题是我检查了https://validator.w3.org/feed/上的RSS Feed,它是一个有效的Feed。其他饲料来源也发生了同样的事情,奇怪的是,有时恰好是错误也在第12行第8列。不仅如此,如果我继续按浏览器上的刷新按钮,第12行有时会更改为第109行然后再回到12.但是等等,还有更多,我测试的其中一个Feed甚至没有超过100行,有时候它仍然显示109行的错误。此外,第12行的相同Feed只有<item>,这意味着没有第8列。我已经在3个单独的Wordpress安装上测试了这个,使用了不同的主题和不同的插件,但是相同版本的Wordpress,4.7。任何人都知道可能发生的事情。

编辑:根据评论中的要求,有问题的RSS代码

<?xml version='1.0' encoding='UTF-8' ?>
<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>
    <channel>
        <title>Online Resource Portal</title>
        <link>http://www.myurl.local/index.php?P=Home</link>
        <description>Channel Description</description>
        <atom:link href='http://www.myurl.local/index.php?P=RSS' rel='self' type='application/rss+xml' />
        <language>es-es</language>
        <pubDate>Thu, 19 Oct 2017 12:00:00 -0400</pubDate>
        <lastBuildDate>Mon, 10 Apr 2017 12:00:00 -0400</lastBuildDate>
        <docs>http://www.rssboard.org/rss-2-0-1</docs>
        <item>
            <title>Laboratorio Clínico</title>
            <link>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=6</link>
            <guid>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=6</guid>
            <description>Laboratorio Clínico</description>
            <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
        </item>
        <item>
            <title>Familia y Juventud</title>
            <link>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=5</link>
            <guid>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=5</guid>
            <description>Familia y Juventud</description>
            <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
        </item>
        <item>
            <title>Diabetes Mellitus en el Embarazo</title>
            <link>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=4</link>
            <guid>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=4</guid>
            <description>Diabetes Mellitus en el Embarazo</description>
            <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
        </item>
        <item>
            <title>Baja Visión</title>
            <link>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=3</link>
            <guid>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=3</guid>
            <description>Baja Visión</description>
            <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
        </item>
        <item>
            <title>Glaucoma</title>
            <link>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=2</link>
            <guid>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=2</guid>
            <description>Glaucoma</description>
            <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
        </item>
        <item>
            <title>Adulto Mayor</title>
            <link>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=1</link>
            <guid>http://www.myurl.local/index.php?P=FullRecord&#x26;ResourceId=1</guid>
            <description>Adulto Mayor</description>
            <pubDate>Wed, 31 Dec 1969 07:00:00 -0500</pubDate>
        </item>
    </channel>
</rss>

我不得不将网址更改为www.myurl.local,因为我不允许发布实际的网址。此外,Feed也会在内部网络上发布。

0 个答案:

没有答案