A .wpl file is XML built from a small part of SMIL. Microsoft defines
thirteen elements in its
Windows Media Playlist Elements Reference,
all requiring Windows Media Player 9 Series or later. This page covers the seven that
every playlist uses. The six that define a dynamic playlist are on
Smart playlists.
Overall shape
<?wpl version="1.0"?>
<smil>
<head>
<meta name="Generator" content="Microsoft Windows Media Player -- 12.0"/>
<meta name="Author" content="Frank Lee"/>
<title>Party Playlist</title>
</head>
<body>
<seq>
<media src="..\Music\First Song.wma"
cid="{ABCDEFAB-ABCD-1234-ABCD-ABCDEF000000}"
tid="{12345678-1234-ABCD-ABCD-123456ABCDEF}"/>
<media src="..\Music\Second Song.mp3"/>
</seq>
</body>
</smil>
The elements nest strictly: smil holds head and
body; head holds title and meta;
body holds seq; seq holds media
elements for a static playlist or a smartPlaylist for a dynamic one.
The first line is the processing instruction
<?wpl version="1.0"?>, which is what marks the file as a Windows
Media playlist rather than general SMIL. It is not defined by the reference beyond
its use in the examples, and 1.0 is the only version Microsoft shows.
Encoding and identification
| Property | Value |
|---|---|
| Extension | .wpl |
| Media type | application/vnd.ms-wpl, registered with IANA in the vendor tree |
| Encoding | Text in XML rules, registered as UTF-8 |
| Magic number | None registered. In practice, look for <?wpl at the start and <smil> as the root. |
| Case | Unlike ASX, element and attribute names are given in exact lower case or camel case. Microsoft’s pages do not say the names are case-insensitive, so treat them as case-sensitive XML. |
Because the file is XML, the characters &, < and
quote marks inside an attribute must be escaped.
smil
The root element. Every playlist must have it. No attributes. Children:
head, body. It does not use a namespace.
head
Metadata for the whole playlist. No attributes. Parent: smil. Children:
title, meta; typically one title and one or
more meta elements.
title
The playlist’s title, as text. No attributes and no children. Parent:
head. Microsoft suggests basing it on the logic of the playlist’s
argument elements if the list is dynamic.
meta
One item of metadata for the whole playlist. Parent: head. No
children. There can be any number of these.
| Attribute | Value | Meaning |
|---|---|---|
name | any string | The name of the item. |
content | string | Its value, for example Rock for Genre. |
A playlist can use any name. Microsoft lists these as typical:
| Name | Holds |
|---|---|
Author | Who made the playlist |
Category | A category, such as Party Music |
Genre | A genre, such as Pop |
UserName | A user; Microsoft’s example uses the numbered form UserName1 |
UserRating | A rating by that user; numbered UserRating1 in the example, with the value 82 |
Generator | The program that wrote the file |
Files written by Windows Media Player also carry names outside this list. Published
examples show ItemCount, TotalDuration and
AverageRating. Microsoft does not document these, so their exact units
and rules are not confirmed.
body
Holds the content of the playlist. No attributes. Parent: smil. Child:
seq. Typically one seq.
seq
The playlist itself. No attributes. Parent: body. Children:
media, smartPlaylist. A seq holding only
media is a static playlist; one holding a smartPlaylist is
dynamic.
media
One item in the playlist, played in file order. Parent: seq. No
children.
| Attribute | Required | Value | Meaning |
|---|---|---|---|
src | yes | URL | The media item: a URL, an absolute path or a path relative to the playlist, usually with backslashes on Windows. |
cid | no | WPL_GUID | Content ID, unique to the media item. The Player fills this in so that it can recognise the same content on another computer even if its metadata changes. |
tid | no | WPL_GUID | Tracking ID, tied to the file system object. The Player uses it to repair the path when the file is renamed or moved. |
Microsoft’s example GUIDs for cid and tid are written
without braces and contain letters beyond hexadecimal, so they are placeholders.
Real values are ordinary GUIDs. The media element in Microsoft’s
reference has only these three attributes; any others seen in a file are not defined
there.