XMLTV Explained: The TV Guide Data Format Behind IPTV EPG
What XMLTV is, how an XMLTV file is structured, how channel IDs link guide data to an IPTV playlist, and how to add an XMLTV URL to popular player apps.
By XCodes IPTV 4K Editorial TeamUpdated 2 min read
XMLTV is the standard XML file format for TV guide data used by most IPTV players. An XMLTV file lists channels (with IDs, names and logos) and programmes (with start and stop times, titles and descriptions). Your player downloads it from an EPG URL, matches its channel IDs to the tvg-id values in your playlist, and builds the on-screen guide. Most guide problems come from ID mismatches or time-zone offsets.
What an XMLTV file looks like
<tv>
<channel id="news.example">
<display-name>Example News</display-name>
<icon src="https://example.com/logo.png"/>
</channel>
<programme start="20261010180000 +0000" stop="20261010190000 +0000" channel="news.example">
<title>Evening News</title>
<desc>Headlines and analysis.</desc>
</programme>
</tv>Key parts
| Element | Purpose |
|---|---|
<channel id> | Unique ID the playlist must match |
<display-name> | Channel name |
<icon> | Channel logo |
<programme start stop channel> | Programme times and which channel |
<title>, <desc> | Programme details |
| Time format | YYYYMMDDhhmmss +hhmm (with time-zone offset) |
Files are often compressed as .xml.gz; most players handle that.
How players match the guide
In an M3U playlist, each channel line can include tvg-id="news.example". The player looks for <channel id="news.example"> in the XMLTV file. If they don't match exactly, that channel shows "No information". With Xtream Codes, the server usually provides both the IDs and the guide. See M3U vs Xtream Codes.
Common XMLTV problems
| Problem | Cause |
|---|---|
| Guide empty for some channels | tvg-id doesn't match the channel ID |
| Times shifted | Offset or device time zone; use the player's time-shift setting |
| Guide slow to load | Very large file; limit days or channels |
| Guide stops after a few days | The file only covers a limited period; refresh it |
Fixes: IPTV EPG not working and add EPG to TiviMate.
Where XMLTV URLs come from
Your provider usually supplies one alongside the M3U URL. Some free sources cover legal free channels. Only use guide sources you trust.
Frequently asked questions
Is XMLTV the same as EPG?
EPG is the guide you see; XMLTV is the most common data format behind it.
Can I edit an XMLTV file?
Yes; it's plain XML. Keep IDs consistent with your playlist.
Why does my guide show the wrong time?
Check the offset in the file and the player's time-shift setting.
Conclusion
XMLTV is a simple XML format: channels with IDs, and programmes with times. Get the IDs and offsets right and the guide works. For the bigger picture, read IPTV technology explained. The official XMLTV DTD (opens in a new tab) defines the format.

