根据以下文档,我解析并构建了包含用于馈送的元标记的 xml 文件。
虽然发送帖子(通过特定端口的http请求)返回成功,但我看到下面的错误,因此喂食失败:
Skipping the rest of the feed, Line number: 1, Error: Couldn't find end of Start Tag meta
我认为这是因为我发送给 feed 的 xml 文件中的特殊字符。您对此有什么想法和解决方案吗?
这是我发送的用于馈送的 XML 示例:
<?xml version="1.0" encoding="utf-8"?>
<gsafeed>
<header>
<datasource></datasource>
<feedtype>metadata-and-url</feedtype>
</header>
<group>
<record url="url.xml" action="add" mimetype="text/html" lock="true">
<metadata>
<meta name="city" content="sample" />
<meta name="cityName" content="sample" />
<meta name="town" content="sample" />
<meta name="type" content="sample" />
<meta name="area" content="sample" />
<meta name="price" content="sample" />
<meta name="currency-code" content="USD" />
<meta name="description" content="" />
<meta name="heading" content="_" />
</metadata>
</record>
</group>
</gsafeed>
最佳答案
<meta name="description" content="" />
元标记上不允许有空内容。
关于java - Google Search Appliance Feed 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30234766/