Google Merchant会抛出“错误的XML标记”错误

时间:2017-01-11 12:49:42

标签: xml

我有这个XML产品文件要在Google Merchant上传,我认为这个问题与RSS2.0规范有关,或者可能与编码有关。 错误在第17行,即字符10.因此它不喜欢g:image_ link标记。虽然谷歌指定了这个标签,但就像这样。 我使用的是UTF8(无BOM)字符集。但我也尝试了不同的字符集。 有什么想法吗?

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0" xmlns:c="http://base.google.com/cns/1.0">
<channel>
<item>
<g:id>123</g:id>
<title>Title</title>
<link>URL</link>
<description>Description</description>
<g:image_​​link>https://abc....jpg</g:image_​​link>
<g:price>89,00</g:price>
<g:google_​​product_​​category>2534</g:google_​​product_​​category>
<g:condition>New</g:condition>
<g:availability>in stock</g:availability>
<g:shipping_weight>1.0000</g:shipping_weight>
</item>
</channel>
</rss>

1 个答案:

答案 0 :(得分:0)

发现问题,虽然我用UTF的notepad ++编辑器保存它而没有BOM,但是有“隐形”不正确的字符。如果我将XML文本转换为Ascii,我注意到下划线前面有两个问号:。 还是不知道他们是怎么进来的。