XML Product Feed Structure Guide 2026
Master XML product feed structure for Google Shopping. Learn RSS 2.0 formatting, namespaces, character encoding, and validation techniques.
📋 Table of Contents
XML Feed Structure Fundamentals
An XML product feed is a structured file format that allows you to share product data with shopping platforms. The standard format is RSS 2.0 with Google Shopping extensions. Always start with XML declaration, RSS opening tag with namespace, channel element with store info, and item elements for each product.
Key Points
- ✓ XML Declaration:
- ✓ RSS 2.0 with Google namespace: xmlns:g="http://base.google.com/ns/1.0"
-
✓
Each product wrapped in
- tags with g: prefixed attributes
Required XML Namespaces
XML namespaces prevent conflicts between elements. Google Shopping requires the "g:" namespace (xmlns:g="http://base.google.com/ns/1.0") for all product attributes. Custom attributes can use the "c:" namespace.
Structure Validation
Verify XML declaration, RSS tags, and proper nesting of elements.
Namespace Check
Ensure g: namespace is declared and used correctly on all attributes.
Character Encoding
Confirm UTF-8 encoding and proper escaping of special characters.
Character Encoding and Special Characters
Always use UTF-8 encoding to support international characters. XML special characters must be escaped: & becomes &, < becomes <, > becomes >, " becomes ", and ' becomes '.
| Feature | Free Tool | Paid Tool |
|---|---|---|
| g: namespace - Google Shopping attributes (required) | ✓ Yes | ✓ Yes |
| c: namespace - Custom attributes (optional) | ✗ No | ✓ Yes |
| No namespace - RSS channel metadata only | ✓ Limited | ✓ Unlimited |
XML Validation and Testing
Validate your XML feed using online validators, Google Merchant Center diagnostics, or Feed Inspect. Check for well-formed XML, proper namespace declarations, and escaped special characters.
💡 Pro Tip
Validate XML structure before submitting to catch encoding errors
⚠️ Common Mistake
Forgetting to escape ampersands in brand names or titles
✅ Best Practice
Use CDATA sections for descriptions with HTML or special chars
Frequently Asked Questions
What is the difference between RSS 2.0 and Atom feeds?
RSS 2.0 is the standard format for Google Shopping feeds and is widely supported. Atom is an alternative format. For Google Shopping, always use RSS 2.0 with the g: namespace.
Do I need to use CDATA sections in my feed?
CDATA sections are optional but recommended for description fields containing HTML or special characters. They allow you to include unescaped content safely.
How do I validate my XML feed structure?
Use online XML validators, Google Merchant Center's diagnostics tool, or Feed Inspect's free analyzer to check for structural errors before submitting your feed.
What encoding should I use for international characters?
Always use UTF-8 encoding (specified in the XML declaration) to support all international characters including accents, umlauts, and non-Latin scripts.
Can I use nested elements in product feeds?
Yes, some attributes support nested elements (like shipping). However, most Google Shopping attributes are simple text fields within the item element.
Ready to Optimize Your Product Feed?
Analyze your product feed in 30 seconds and get instant recommendations to improve quality and boost Google Shopping performance.
Try Free Feed Analyzer