XML 验证
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
为确保 Google 能够处理您的 Feed,请在提交 Feed 之前先使用 XML 架构验证工具进行验证。您可以使用 xmllint 通过以下命令验证 Feed:
xmllint --schema http://www.google.com/shopping/reviews/schema/product/2.4/product_reviews.xsd \
--noout file.xml
替代方案
您可以使用多种工具来验证 XML 文件的结构:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eGoogle Shopping requires XML data feeds to adhere to a specific XML schema for successful processing.\u003c/p\u003e\n"],["\u003cp\u003eUse the \u003ccode\u003exmllint\u003c/code\u003e command with the provided schema URL to validate your XML feed before submission.\u003c/p\u003e\n"],["\u003cp\u003eSeveral alternative tools for XML schema validation are available, including those listed from W3C, Altova, Oxygen, and libxml2.\u003c/p\u003e\n"]]],["Validate XML feeds before submitting to Google using an XML schema validator. The `xmllint` command with the Google schema URL verifies the feed structure: `xmllint --schema http://www.google.com/shopping/reviews/schema/product/2.3/product_reviews.xsd --noout file.xml`. Alternative tools for XML validation include resources from W3C, Altova XMLSpy, oXygen XML Editor, and `xmllint` from `libxml2`. These tools help check the structure and validity of the XML files.\n"],null,["# XML Validation\n\nTo ensure that Google can process your feed, use an XML schema validator\nbefore submitting your feed. You can use xmllint to validate your feed with\nthis command: \n\n xmllint --schema http://www.google.com/shopping/reviews/schema/product/2.4/product_reviews.xsd \\\n --noout file.xml\n\nAlternatives\n------------\n\nThere are a number of tools available to help you validate the structure of\nyour XML files:\n\n- [W3C list of XML schema tools](http://www.w3.org/XML/Schema#Tools)\n- [Altova XMLSpy XML Editor](http://www.altova.com/xmlspy.html)\n- [oXygen XML Editor](http://www.oxygenxml.com/)\n- [xmllint](http://xmlsoft.org/xmllint.html) from [libxml2](http://www.xmlsoft.org/)"]]