Feedsby Internet Solutions

Google Product XML Format Explained: RSS, Atom and g: Tags

16 tháng 9, 20268 phút đọcNguồn cấp sản phẩm
Google Product XML Format Explained: RSS, Atom and g: Tags

Short answer: Google’s product XML format is an RSS 2.0 (or Atom 1.0) feed in which each product is an item element, and product attributes are added as elements in Google’s namespace, written with a g: prefix, such as g:id, g:price and g:availability. The file must be well-formed XML in UTF-8, with special characters escaped. Repeated attributes, such as additional images, are simply repeated elements. Meta and many other platforms read the same format.

Why product feeds borrowed RSS

RSS was designed to publish a list of items, such as blog posts, in a standard way that any reader can process. A product catalog is also a list of items. Instead of inventing a completely new format, Google extended RSS: the familiar channel and item structure stays, and product-specific fields are added through an XML namespace.

That choice has practical benefits. Many tools already know how to generate and parse RSS. The structure is easy to understand. And because namespaces are a standard XML feature, the product fields can coexist with regular RSS fields without conflict. Atom 1.0, another feed standard, can be extended in the same way, and Google accepts both.

It also explains why a normal blog RSS feed is not a product feed: it has the structure, but not the product fields that shopping platforms require.

For store owners, the practical takeaway is simple: you rarely need to write this XML by hand. But understanding its structure makes it much easier to read a feed file, spot a problem and explain it to whoever maintains the generator. Ten minutes spent opening your own feed in a browser is often the fastest way to understand what platforms actually receive.

The overall structure

An RSS-based product feed has three layers:

  1. The rss root element, with version 2.0 and a namespace declaration that binds the g prefix to Google’s base namespace URL.
  2. A channel element with a title, link to the store and a short description of the feed.
  3. One item element per product or variant, containing the product attributes.

The namespace declaration is essential. Without it, g:price is just an unknown element name and the file is not valid in the way platforms expect. Feed generators add it automatically; hand-built files often forget it.

In Atom, the equivalent is a feed root element with entry elements instead of items, and the same g namespace for product attributes. Choose one format and stay with it; there is no advantage in switching.

The channel-level elements are informational. Platforms do not use the channel title for anything important, but a clear title such as the store name and feed purpose helps humans who open the file later.

Inside an item

Each item contains the attributes for one product, most of them with the g: prefix:

Title, link and description can use the standard RSS elements or the g: versions. Using one convention consistently is more important than which one you choose.

Item order does not matter to platforms, and neither does the order of elements within an item. What matters is that each item is complete and each value is valid. Sorting items by ID can still be useful for people comparing two versions of a feed, because differences are easier to spot.

Attribute values are case-sensitive in some places. Availability values like in_stock should be written exactly as documented, and currency codes should use the standard three uppercase letters. Consistent casing avoids surprises when platforms tighten validation.

Repeated and nested attributes

XML handles repeated and structured data naturally, which is one of its advantages over CSV:

In a CSV file, the same data has to be packed into one field with separators and colons, which is harder to read and easier to break.

Escaping and encoding

XML has a few characters with special meaning. Inside text, they must be escaped or the file becomes invalid:

Character Escape as Where it appears
& & Brand names, titles, URLs with parameters
< &lt; Descriptions with leftover HTML
> &gt; Category paths such as Home > Kitchen
“ &quot; (in attributes) Sizes in inches, quotes in titles

Alternatively, text can be wrapped in CDATA sections, which tell the parser to treat the content as plain text. Unescaped ampersands in URLs are one of the most common reasons a hand-built XML feed fails to parse. The file should be saved as UTF-8, and the XML declaration at the top should say so.

If you generate XML with a proper library rather than by concatenating strings, escaping and encoding are handled automatically. Most encoding and escaping bugs come from templates that paste raw text into XML without passing it through the library.

Validating an XML feed

  1. Well-formedness: open the file in a browser or XML tool; any syntax error is reported with a line number.
  2. Namespace: check that the root element declares the g namespace.
  3. Item count: count item elements and compare with the number of products you expect.
  4. Sample values: inspect a few items for correct prices, currencies and availability values.
  5. Platform test: submit the file as a test source and read the processing report before making it primary.

Merchant Center reports parsing problems and attribute errors after processing. A drop in the number of items processed compared with the number in the file is a sign that some items could not be read.

Common XML feed mistakes

Most broken XML feeds fail for a small set of reasons. Knowing them makes troubleshooting much faster:

The last point is worth emphasizing. A truncated file often looks fine at the top, and the problem is only visible at the end. Checking that the file ends with the closing rss or feed element is a quick sanity test after every generation.

XML for Meta and other platforms

Meta’s catalog accepts XML feeds in RSS and Atom format and recognizes Google’s attribute names, so a correctly built Google product XML file usually works there without changes. Many comparison sites and marketing tools accept the same format. That portability is a strong reason to use XML as the main format for a store’s product data, even if some destinations also accept CSV.

Some marketplaces have their own XML schemas with different element names and required fields. For those, the data is the same but the structure differs, and a separate feed or a conversion step is needed.

If you maintain feeds for several destinations, keep the Google format as the master and derive others from it. That way the core data is validated once, and destination-specific differences stay small and visible.

How Feeds helps

Feeds generates Google product XML automatically from WooCommerce, Shopify or a CSV link, with the namespace, escaping and required elements handled for you: id, title, link, image, price, availability and brand. Merchant Center and Meta can both fetch the file, which refreshes automatically. Rules skip out-of-stock products, rewrite titles and adjust prices. See the pricing page for plans.

Related reading

The bottom line

Google’s product XML is RSS 2.0 or Atom with product attributes in the g namespace: a root element with the namespace declaration, a channel, and one item per product. Escape special characters, save in UTF-8, use repeated elements for multi-value attributes, and validate before switching sources. The same file typically serves Meta too.

FAQ

Is a Google product feed an RSS feed?

Structurally yes. It uses RSS 2.0 or Atom with extra product fields in Google’s namespace. A regular blog RSS feed lacks those fields and is not a product feed.

What does the g: prefix mean?

It marks elements from Google’s product namespace, declared at the top of the file. Attributes like g:price and g:availability use it.

Why does my XML feed fail to parse?

The most common cause is an unescaped ampersand, often in URLs or brand names. Other causes are leftover HTML and wrong encoding.

Can I include several images in XML?

Yes. Repeat g:additional_image_link once for each extra image, up to the platform’s limit.

Does Meta accept Google’s XML format?

Yes. Meta catalogs accept RSS and Atom XML feeds and recognize Google’s attribute names.

#Google Merchant Center#Product feeds#RSS
Tạo nguồn cấp đầu tiên của bạn — miễn phí.Nguồn cấp từ mọi trang. Mọi sản phẩm trong mọi danh mục.
Bắt đầu miễn phí
Internet Solutions

Sản phẩm khác từ đội ngũ chúng tôi

Do Internet Solutions phát triển. Hãy thử các sản phẩm khác của chúng tôi — mỗi sản phẩm giúp bạn tiết kiệm thời gian theo một cách riêng.

internet-solutions.net ↗
Tự động đăng mạng xã hộiĐang hoạt động
PostRSS

Bài mới từ nguồn cấp RSS của bạn được tự động đăng lên Facebook, X, LinkedIn, Telegram và hơn 60 mạng khác.

Gói miễn phí · từ 2014Truy cập →
Chat trực tuyến AI cho websiteĐang hoạt động
Talkmio

Website của bạn trả lời khách truy cập 24/7 từ chính nội dung của bạn, bằng ngôn ngữ của họ.

Gói miễn phí · không cần thẻTruy cập →
Trợ lý AIĐang hoạt động
Ask Mio

Trò chuyện, viết code, thiết kế, viết bài và nghiên cứu. Mio chọn mô hình tốt nhất cho từng việc.

Gói miễn phíTruy cập →
Lái tự động AI cho blog và mạng xã hộiĐang hoạt động
AI Blog Autopilot

AI viết bài SEO dài 2.000–3.000 từ và chia sẻ từng bài lên hơn 58 mạng xã hội.

3 bài đầu tiên miễn phíTruy cập →
Kiểm tra sức khỏe websiteĐang hoạt động
Site AI Audit

SEO, tốc độ, SSL, bảo mật và cấu hình email trong một báo cáo, sắp xếp theo việc cần sửa trước.

Lần kiểm tra đầu tiên miễn phíTruy cập →
Thu thập SEO chuyên sâuĐang hoạt động
Site SEO AI Audit

Thu thập SEO toàn diện trên 7 lĩnh vực, gồm cả khả năng hiển thị trong tìm kiếm AI, với cách sửa xếp theo mức tác động.

Lần kiểm tra đầu tiên miễn phíTruy cập →
Phát triển website và SEOĐang hoạt động
Internet Solutions

Website, cửa hàng trực tuyến và hệ thống theo yêu cầu, do đội ngũ của chúng tôi thiết kế, xây dựng và vận hành.

Từ 2011Truy cập →
Feeds
Tổng quan quyền riêng tư

Website này dùng cookie để mang lại trải nghiệm người dùng tốt nhất có thể. Thông tin cookie được lưu trong trình duyệt của bạn và thực hiện các chức năng như nhận ra bạn khi bạn quay lại, giúp đội ngũ chúng tôi hiểu phần nào của website bạn thấy thú vị và hữu ích nhất.