# Element and tag in an XML feed – meaning and example

> An element is a part of an XML file with a tag and content, such as a product's title or price. Element vs tag, and common mistakes in element names.

Source: <https://sortyra.com/glossary/xml-element>

---

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

# XML element

Sortyra team · February 19, 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](https://sortyra.com/glossary/what-is-an-xml-file)
- [XML attribute](https://sortyra.com/glossary/xml-attribute-in-feed)

An element is the basic building block of an XML file. It consists of an opening tag with a name, the content and a closing tag. In a feed, every piece of product data – title, price, EAN or image – is stored in its own element with an exact name, which comparison sites and Google use to find it.

**In this article**

1. What is an element
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 an element

A **tag** is a name in angle brackets, for example `<PRICE_VAT>`. An **element** is the whole thing: the opening tag, the content and the closing tag with a slash, i.e. `<PRICE_VAT>129.90</PRICE_VAT>`. In everyday speech the two terms are used interchangeably, and that does no harm.

Think of an element as a drawer with a label. The label says what is in the drawer ("price"), and inside is the value itself. A drawer can also contain smaller drawers – the `SHOPITEM` element contains the elements `PRODUCTNAME`, `PRICE_VAT` and others. These are called **nested** elements.

An element with no content can be written in short form as `<VIDEO_URL/>`.

## What it looks like in a feed

`<!-- Heureka, Zboží --> <SHOPITEM> <PRODUCTNAME>Brava Basic T-shirt white</PRODUCTNAME> <PARAM> <PARAM_NAME>Size</PARAM_NAME> <VAL>M</VAL> </PARAM> </SHOPITEM> <!-- Google Merchant --> <item> <g:title>Brava Basic T-shirt white</g:title> <g:size>M</g:size> </item>`

The same piece of data has a different element in each format: for Heureka the size is a nested `PARAM` element, for Google a separate `g:size` element.

## What it is used for

A channel reads a feed by element names. Heureka and Zboží.cz look for the price in `PRICE_VAT`, Google in `g:price`. A channel usually ignores an element with an unknown name, and a missing required element means the product won't pass. So every channel's specification is essentially a list of elements – which are required, what form they take and how many times they may repeat.

## What to watch out for

- **A typo in the name.** The channel won't recognise `PRODUCT_NAME` instead of `PRODUCTNAME`, and the product title will be missing.
- **Upper and lower case.** `<ean>` and `<EAN>` are two different elements.
- **A missing prefix.** In a Google feed, field names take the `g:` prefix, and the Google namespace must be declared in the header.
- **Unclosed or overlapping elements** make the whole file unreadable.
- **Empty elements.** Google recommends leaving empty fields out altogether.

## How Sortyra helps

In the source detail, the **Structure** tab shows all the fields of a supplier's feed with how often they are filled in, and flags any that are **Gone**, **Emptied** or **New**. On the **Mapping** tab you assign the supplier's elements to Sortyra fields.

## Related terms

- [XML](https://sortyra.com/glossary/what-is-an-xml-file)
- [XML attribute](https://sortyra.com/glossary/xml-attribute-in-feed)
- [Feed item](https://sortyra.com/glossary/feed-item-shopitem)
- [Field mapping](https://sortyra.com/glossary/data-mapping)
- More detail: [Feed types](https://sortyra.com/knowledge-base/feed-types-xml-csv-json) and [Fields and values](https://sortyra.com/knowledge-base/feed-fields-and-values)

## Frequently asked questions

### What is the difference between a tag and an element?

A tag is just the marker in angle brackets; an element is the whole section from the opening to the closing tag, including the content.

### What does g: before an element name mean?

It is the Google namespace prefix. It says that the element belongs to the Google Merchant Center specification.

### Does the order of elements in an item matter?

For ordinary feeds for comparison sites and Google, generally not – what matters is that the element is in the right item and has the right name.

[← Previous 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)
