# Selectively load different playlist using one XML?

**URL:** <https://forum.kirupa.com/t/selectively-load-different-playlist-using-one-xml/278198>\
**Category:** flash\
**Created:** [December 23, 2008, 8:39pm UTC](https://forum.kirupa.com/t/selectively-load-different-playlist-using-one-xml/278198 "2008-12-23T20:39:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dougeefresh](https://avatars.discourse-cdn.com/v4/letter/d/ba9def/32.png) [@Dougeefresh](https://forum.kirupa.com/u/Dougeefresh)\
**Post date:** [December 23, 2008, 8:39pm UTC](https://forum.kirupa.com/t/selectively-load-different-playlist-using-one-xml/278198/1 "2008-12-23T20:39:11Z")

</div>

Hello.

I am not sure if this is possible or not but I hope to find the answer here.

I have a page with a Flash MP3 player that uses an XML file to load a playlist.  
I would like to make the player work in a way that depending on what variable is attached to the URL, the MP3 player will load a different playlist, all the while using only one XML. So for instance:

XML would be like this:  
\<title pagename=“a”\>  
\<song\>song1.mp3\</song\>  
\<song\>song2.mp3\</song\>  
\</title\>  
\<title pagename=“b”\>  
\<song\>song3.mp3\</song\>  
\<song\>song4.mp3\</song\>  
\</title\>

If the page is loaded as “[http://www.whatever.com/mp3player.html?pagename=a](http://www.whatever.com/mp3player.html?pagename=a)” then it will load song1 & song2.

If the page is loaded as “[http://www.whatever.com/mp3player.html?pagename=b](http://www.whatever.com/mp3player.html?pagename=b)” then it would load song3 & song4.

Is this possible to do and if so how can I achieve this?  
Thanks in advance!
