sportshound
sportshound

Reputation: 1

Filling Flash as3 playlist with XML generated from mySQL via php

I have an online flash video player fed by a playlist driven by XML.

This XML is generated from a mySQL database via 'playlist.php'.

The issue I am having is that when I feed the php generated xml into the player, it only reads the top level/hierarchy of xml information into the playlist (i.e. gallery level, when below that is category, and ultimately video).

When I copy the output of the php generated xml into a normal xml file (i.e. playlist.xml), the playlist is fed with all of the appropriate information, and is complete.

Can you tell me why my flash (as3) video player and playlist will recognise 'playlist.xml' but not 'playlist.php' information?

Links to both files are below:

http://www.sportshound.co.uk/Source%203/output/playlist.php

http://www.sportshound.co.uk/Source%203/output/playlist.xml

A link to the player, which is currently hooked up to 'playlist.php' is at the same address but with theater.html instead of playlist.

Upvotes: 0

Views: 559

Answers (2)

Jevgenij Dmitrijev
Jevgenij Dmitrijev

Reputation: 2238

You have different contents comming from XML and PHP files.

And before exporting the XML from PHP you needto add:

header ("Content-Type:text/xml"); 

Upvotes: 0

Philipp Kyeck
Philipp Kyeck

Reputation: 18820

you PHP file only contains CONTENT and GALLERY nodes whereas the xml file also has ITEMs. seems there is a problem expoting your data from MySQL as xml.

btw: think about not using so many attributes - use subnodes instead. there you can add the CDATA sections.

Upvotes: 1

Related Questions