sortyra.com/glossary/what-is-an-xml-file

What is XML? An explanation and an XML feed example

Markdownllms.txtai-catalog.jsonSKILL.mdauth.md
# What is XML? An explanation and an XML feed example

> XML is a text format in which every piece of data sits between tags. What XML is, what an XML feed for Google and Heureka looks like and what to avoid.

Source: <https://sortyra.com/glossary/what-is-an-xml-file>

---

[Sortyra](https://sortyra.com/) [Glossary](https://sortyra.com/glossary) [U – X](https://sortyra.com/glossary/u-x)

# XML

Sortyra team · February 12, 2026 · 3 min read

[Glossary](https://sortyra.com/glossary)

[A – D](https://sortyra.com/glossary/a-d) [E – H](https://sortyra.com/glossary/e-h) [I – L](https://sortyra.com/glossary/i-l) [M – P](https://sortyra.com/glossary/m-p) [Q – T](https://sortyra.com/glossary/q-t) [U – X](https://sortyra.com/glossary/u-x)

- [Unmatched offer](https://sortyra.com/glossary/unmatched-offer-comparison-site)
- [URL](https://sortyra.com/glossary/what-is-a-url)
- [UTF-8 encoding](https://sortyra.com/glossary/utf-8-encoding-in-feed)
- [UTM parameters](https://sortyra.com/glossary/utm-parameters-in-links)
- [Value mapping table](https://sortyra.com/glossary/value-mapping-table-feed)
- [VAT in the feed](https://sortyra.com/glossary/vat-in-feed-price-and-rate)
- [Webhook](https://sortyra.com/glossary/what-is-a-webhook)
- [Webhook signature (HMAC)](https://sortyra.com/glossary/webhook-signature-hmac)
- [Wholesale](https://sortyra.com/glossary/wholesale-b2b-feed)
- [XLSX](https://sortyra.com/glossary/what-is-an-xlsx-file)
- [XML attribute](https://sortyra.com/glossary/xml-attribute-in-feed)
- [XML element](https://sortyra.com/glossary/xml-element)

XML is a text format for writing structured data. Every piece of data sits between an opening and a closing tag with a name, so a computer knows exactly what the price is and what the product title is. Most product feeds for price comparison sites and Google Merchant Center are written in XML.

**In this article**

1. What is XML
2. What it looks like in a feed
3. What it is used for
4. What to watch out for
5. How Sortyra helps
6. Related terms
7. Frequently asked questions

## What is XML

XML (_eXtensible Markup Language_) is plain text that you can open even in Notepad. The data in it is wrapped in **tags**, like things packed in labelled boxes: the box says "price" and inside is 129.90. Boxes can go inside each other – a big "product" box contains smaller "title", "price" and "image" boxes.

"Extensible" means that whoever designs the format chooses the tag names. That is why Heureka uses `PRODUCTNAME` and Google uses `g:title` – both are XML, just with different labels.

A file usually starts with the header `<?xml version="1.0" encoding="UTF-8"?>`, which states the XML version and the [character encoding](https://sortyra.com/glossary/utf-8-encoding-in-feed).

## What it looks like in a feed

`<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> <channel> <item> <g:id>SPAC-310</g:id> <g:title>Horal Mumia 300 sleeping bag</g:title> <g:price>79.90 EUR</g:price> </item> </channel> </rss>`

The example is a Google Merchant feed with one product – the `g:` prefix marks fields from the Google specification; Heureka and Zboží.cz use a `SHOP` wrapper and `SHOPITEM` items without a prefix.

## What it is used for

- **Price comparison sites** – Heureka and Zboží.cz accept product feeds in XML.
- **Google Merchant Center** – accepts XML (RSS 2.0 or Atom) as well as a tab-separated text file.
- **Meta** – the catalogue for Facebook and Instagram can load XML in the same shape as Google's.
- **Suppliers and e-commerce platforms** – product exports are very often in XML.

The advantage of XML is that it handles nested data: several images, a list of attributes, variants or several shipping methods for one product.

## What to watch out for

- **Every opening tag must be closed**, in the right order – the inner one first, then the outer one.
- **Upper and lower case matter.** To a computer, `<EAN>` and `<ean>` are two different pieces of data.
- **The characters `&` and `<` in text** must be written as `&amp;` and `&lt;` or placed in a [CDATA](https://sortyra.com/glossary/cdata-in-xml-feed) block.
- **The encoding in the header** must match how the file is actually saved.
- **One markup error** means a program won't read the file – often the whole feed stops, not just one product.

## How Sortyra helps

Sortyra loads XML in standard formats (Heureka, Google, Shoptet) as well as in a supplier's own structure, and finds the repeating items by itself. A lone `&` character, which would stop the reading, is corrected to `&amp;` on loading.

## Related terms

- [Feed](https://sortyra.com/glossary/what-is-a-feed-meaning)
- [Element (tag)](https://sortyra.com/glossary/xml-element)
- [XML attribute](https://sortyra.com/glossary/xml-attribute-in-feed)
- [CDATA](https://sortyra.com/glossary/cdata-in-xml-feed)
- [UTF-8 encoding](https://sortyra.com/glossary/utf-8-encoding-in-feed)
- More detail: [Feed types: XML, CSV, JSON](https://sortyra.com/knowledge-base/feed-types-xml-csv-json) and [Common feed errors](https://sortyra.com/knowledge-base/common-feed-errors-how-to-fix)

## Frequently asked questions

### What do I open an XML file with?

Any text editor, or a web browser, which displays XML as a clear tree.

### Is XML better than CSV?

For more complex data (several images, attributes, variants), yes. CSV is easier to edit in a spreadsheet program.

### What is an XML feed?

A product feed written in XML format – a list of products in which every piece of data sits in a tag with an exact name.

[← Previous article **XLSX**](https://sortyra.com/glossary/what-is-an-xlsx-file) [Next article → **XML attribute**](https://sortyra.com/glossary/xml-attribute-in-feed)

## Try it on your own feed

[Try it free](https://app.sortyra.com/registracia?lang=en) [Book a 15-min call](https://sortyra.com/contact)