Change XML Format in playlist.xml
Posted: 10 Apr 2006 20:50
Hi all,
I am having some issuse parsing the xml from the playlist.xml file into a flash application. Currently the file produced looks something like this
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node id="1" name="Undefined" ro="rw" >
<node id="3" name="General" ro="ro" >
<leaf id="4" uri="C:\Documents and Settings\Gareth\My Documents\Downloads\02gnarls.mp3" name="C:\Documents and Settings\Gareth\My Documents\Downloads\02gnarls.mp3" ro="rw" duration="-1" />
<leaf id="5" uri="C:\Ashley Long & Paris.wmv" name="Ashley Long & Paris" ro="rw" duration="1018999000" />
<leaf id="6" current="current" uri="C:\NowThatsaStereo.mpg" name="C:\NowThatsaStereo.mpg" ro="rw" duration="15406664" />
</node>
</node>
Now flash just will not read this file, the only way i can make it work is by manually changing a static playlist.xml file to look like this.
<nodes>
<node id="1" name="Undefined" ro="rw" ></node>
<node id="3" name="General" ro="ro" >
<leaf id="4" uri="C:\Documents and Settings\Gareth\My Documents\Downloads\02gnarls.mp3" name="C:\Documents and Settings\Gareth\My Documents\Downloads\02gnarls.mp3" ro="rw" duration="-1" />
<leaf id="5" uri="C:\Ashley Long & Paris.wmv" name="Ashley Long & Paris" ro="rw" duration="1018999000" />
<leaf id="6" current="current" uri="C:\NowThatsaStereo.mpg" name="C:\NowThatsaStereo.mpg" ro="rw" duration="15406664" />
</node>
</nodes>
I know this isn't strictly the correct format, but the actual name of the playlist isn't relivant for me, i can just ignore the first result. So can anyone guide me to what i would need to change within the vlc web files to produce the fiel dynamically, it seems to be a case of just adding a new </node> tag, but no matter where i try to add it i end up with invalid xml.
So can anyone help please!!!
Cheers
Gareth
I am having some issuse parsing the xml from the playlist.xml file into a flash application. Currently the file produced looks something like this
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<node id="1" name="Undefined" ro="rw" >
<node id="3" name="General" ro="ro" >
<leaf id="4" uri="C:\Documents and Settings\Gareth\My Documents\Downloads\02gnarls.mp3" name="C:\Documents and Settings\Gareth\My Documents\Downloads\02gnarls.mp3" ro="rw" duration="-1" />
<leaf id="5" uri="C:\Ashley Long & Paris.wmv" name="Ashley Long & Paris" ro="rw" duration="1018999000" />
<leaf id="6" current="current" uri="C:\NowThatsaStereo.mpg" name="C:\NowThatsaStereo.mpg" ro="rw" duration="15406664" />
</node>
</node>
Now flash just will not read this file, the only way i can make it work is by manually changing a static playlist.xml file to look like this.
<nodes>
<node id="1" name="Undefined" ro="rw" ></node>
<node id="3" name="General" ro="ro" >
<leaf id="4" uri="C:\Documents and Settings\Gareth\My Documents\Downloads\02gnarls.mp3" name="C:\Documents and Settings\Gareth\My Documents\Downloads\02gnarls.mp3" ro="rw" duration="-1" />
<leaf id="5" uri="C:\Ashley Long & Paris.wmv" name="Ashley Long & Paris" ro="rw" duration="1018999000" />
<leaf id="6" current="current" uri="C:\NowThatsaStereo.mpg" name="C:\NowThatsaStereo.mpg" ro="rw" duration="15406664" />
</node>
</nodes>
I know this isn't strictly the correct format, but the actual name of the playlist isn't relivant for me, i can just ignore the first result. So can anyone guide me to what i would need to change within the vlc web files to produce the fiel dynamically, it seems to be a case of just adding a new </node> tag, but no matter where i try to add it i end up with invalid xml.
So can anyone help please!!!
Cheers
Gareth