开发者

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开发者_StackOverflow社区/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.


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.


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"); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜