# XSPF Export Template

**URL:** https://community.mp3tag.de/t/xspf-export-template/3976
**Category:** Export
**Created:** [October 30, 2006, 2:21am UTC](https://community.mp3tag.de/t/xspf-export-template/3976 "2006-10-30T02:21:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![thierryt64](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/t/45deac/32.png) [@thierryt64](https://community.mp3tag.de/u/thierryt64)
#### Post date: [October 30, 2006, 2:21am UTC](https://community.mp3tag.de/t/xspf-export-template/3976/1 "2006-10-30T02:21:10Z")

</div>

Here's a template I just wrote for the excellent (and free) XSPF Flash music player:

XSPF Web Music Player (Flash) - Plays MP3 on your website  
[http://musicplayer.sourceforge.net/](http://musicplayer.sourceforge.net/)

[XSPF.mte](https://community.mp3tag.de/uploads/default/original/2X/e/eecc7f5ff2e7226338f294aae10391f50a1e3088.mte) (438 Bytes)

---

<div class="post-metadata">

### Author: ![mithrin](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/59ef9b/32.png) [@mithrin](https://community.mp3tag.de/u/mithrin)
#### Post date: [October 8, 2007, 8:42pm UTC](https://community.mp3tag.de/t/xspf-export-template/3976/2 "2007-10-08T20:42:49Z")

</div>

Hi, I've made this one some time ago because I thought the play list was logical.

What do you think ?

I can't upload this so here:-

$filename(%\_folderpath%%\_directory%.xml,ansi)\<?xml version="1.0" encoding="UTF-8"?\>

%comment% cover.jpg %year%

```
<trackList>

```

$loop(%track%)

```
    <track>
		<album>%album%</album>
		<creator>%artist%</creator>
		<title>%title%</title>
		<trackNum>%track%</trackNum>
		<location>%_filename_ext%</location>
		<annotation></annotation>
		<duration>%_length_seconds%</duration>
		<image></image>
		<info></info>
		<identifier></identifier>
    </track>

```

$loopend()

```
</trackList>

```

---

<div class="post-metadata">

### Author: ![vitor023](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/f04885/32.png) [@vitor023](https://community.mp3tag.de/u/vitor023)
#### Post date: [January 17, 2009, 1:08am UTC](https://community.mp3tag.de/t/xspf-export-template/3976/3 "2009-01-17T01:08:00Z")

</div>

Both them generate invalid xspf (%\_filename\_ext% isn't a URI) ;/

I don't think there is a way to generate valid ones though. If someone knows, help would be appreciated.

---

<div class="post-metadata">

### Author: ![mithrin](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/59ef9b/32.png) [@mithrin](https://community.mp3tag.de/u/mithrin)
#### Post date: [June 18, 2009, 6:13pm UTC](https://community.mp3tag.de/t/xspf-export-template/3976/4 "2009-06-18T18:13:08Z")

</div>

If you look this generates an XML not URL. The only problem is that some programs only reconise the part and not the full playlist.

---

<div class="post-metadata">

### Author: ![squonk63](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/8dc957/32.png) [@squonk63](https://community.mp3tag.de/u/squonk63)
#### Post date: [July 2, 2009, 3:23pm UTC](https://community.mp3tag.de/t/xspf-export-template/3976/5 "2009-07-02T15:23:09Z")

</div>

> [@vitor023](#):
>
> Both them generate invalid xspf (%\_filename\_ext% isn't a URI) ;/
> 
> I don't think there is a way to generate valid ones though. If someone knows, help would be appreciated.

try replacing this line

%\_filename\_ext%

with

file:///$replace(%\_filename\_ext%,,/)

I've not tested this, so give it a try and let us know if it works...
