FeedFixer logo for XML product feed repair and hosting

Guides

Google Feed Invalid XML (broken product feed)

If Google Merchant Center says your feed has invalid XML, it usually means the feed is not well-formed (or it is missing the Google namespace), so Google can’t reliably parse product data.

The issue

A single XML error can stop feed processing entirely. Common causes include unescaped & characters, tag mismatch, hidden encoding bytes (BOM), or missing the xmlns:g namespace when using g: attributes.

  • Well-formed XML is required before any Merchant checks.
  • Namespace matters: g: attributes need xmlns:g.
  • Unescaped characters inside text nodes break parsing.

Broken example

This example fails because it uses g: attributes without declaring the namespace, and includes a bare ampersand inside <g:title>.

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>My Store</title>
    <item>
      <g:id>SKU-1001</g:id>
      <g:title>Salt & Pepper Shakers</g:title>
      <g:price>19.99 USD</g:price>
    </item>
  </channel>
</rss>

The fix

Declare the Google namespace once on the root element and escape characters like & as &amp; (unless the text is inside CDATA).

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
  <channel>
    <title>My Store</title>
    <item>
      <g:id>SKU-1001</g:id>
      <g:title>Salt &amp; Pepper Shakers</g:title>
      <g:price>19.99 USD</g:price>
    </item>
  </channel>
</rss>