XML Feed Formats

XML is the primary feed format for Google Shopping and Amazon SP-API. Each platform uses a different XML structure -- Google uses RSS 2.0 with a custom namespace, while Amazon uses a proprietary envelope format. Understanding the correct XML structure prevents parsing errors and feed rejections.

Google Shopping XML (RSS 2.0 with g: Namespace)

Google Merchant Center accepts product feeds in RSS 2.0 format extended with the g: namespace for Google-specific product attributes. Each product is wrapped in an <item> element within the RSS channel.

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
  <channel>
    <title>Example Store Product Feed</title>
    <link>https://example.com</link>
    <description>Product feed for Google Shopping</description>
    <item>
      <g:id>SKU-12345</g:id>
      <g:title>Nike Air Max 90 - Black/White - Men's Size 10</g:title>
      <g:description>Classic running shoe with visible Air cushioning unit.</g:description>
      <g:link>https://example.com/shoes/air-max-90</g:link>
      <g:image_link>https://example.com/images/air-max-90.jpg</g:image_link>
      <g:additional_image_link>https://example.com/images/air-max-90-side.jpg</g:additional_image_link>
      <g:availability>in_stock</g:availability>
      <g:price>129.99 USD</g:price>
      <g:sale_price>99.99 USD</g:sale_price>
      <g:brand>Nike</g:brand>
      <g:gtin>0884776536842</g:gtin>
      <g:condition>new</g:condition>
      <g:google_product_category>187</g:google_product_category>
      <g:product_type>Footwear > Running Shoes > Men's</g:product_type>
      <g:color>Black/White</g:color>
      <g:size>10</g:size>
      <g:shipping>
        <g:country>US</g:country>
        <g:service>Ground</g:service>
        <g:price>5.99 USD</g:price>
      </g:shipping>
    </item>
  </channel>
</rss>

Namespace declaration is required. The xmlns:g="http://base.google.com/ns/1.0" attribute must be present on the <rss> element. Feeds without this namespace declaration fail validation.

Atom Feed Format

Google also accepts Atom 1.0 feeds as an alternative to RSS 2.0. The Atom format uses <entry> elements instead of <item> and requires an Atom namespace in addition to the Google namespace.

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:g="http://base.google.com/ns/1.0">
  <title>Example Store Product Feed</title>
  <link href="https://example.com" rel="alternate"/>
  <updated>2026-04-12T00:00:00Z</updated>
  <entry>
    <g:id>SKU-12345</g:id>
    <g:title>Nike Air Max 90 - Black/White</g:title>
    <g:description>Classic running shoe with Air cushioning.</g:description>
    <g:link>https://example.com/shoes/air-max-90</g:link>
    <g:image_link>https://example.com/images/air-max-90.jpg</g:image_link>
    <g:availability>in_stock</g:availability>
    <g:price>129.99 USD</g:price>
    <g:brand>Nike</g:brand>
    <g:gtin>0884776536842</g:gtin>
    <g:condition>new</g:condition>
  </entry>
</feed>

XML Feed Requirements

RequirementGoogle ShoppingAmazon SP-API
EncodingUTF-8 (required)UTF-8 (required)
XML declarationRecommendedRequired
Root element<rss> or <feed><AmazonEnvelope>
Namespaceg: (Google base)xsi (XML Schema Instance)
Maximum file size4 GB uncompressed2 GB per feed document
Compressiongzip, zip, bz2 supportedgzip recommended for feeds over 1 MB
Special charactersEscape with XML entities (&amp; &lt; &gt;)Escape with XML entities or use CDATA

Validation Tools

Google Merchant Center Diagnostics

Built-in feed diagnostics in Merchant Center shows item-level errors, warnings, and attribute quality scores. Access via Products > Diagnostics. Shows real-time disapproval reasons and suggested fixes.

XML Lint / xmllint

Command-line XML validation. Run xmllint --noout --schema schema.xsd feed.xml to validate against an XSD. Pre-installed on most Linux/macOS systems. Catches well-formedness and schema errors before submission.

Amazon Feed Processing Reports

After feed submission, download the processing report via SP-API. Reports list each record with status (Success, Warning, Error) and error codes. Error code 8572: missing required field. Error code 99042: invalid value for attribute.

RSS 2.0 Validators

W3C Feed Validation Service validates RSS 2.0 structure. Note: generic RSS validators may not recognize g: namespace extensions but will catch structural XML issues.