hexcode Posted July 16, 2014 Share Posted July 16, 2014 (edited) <?xml-stylesheet href="/player.xsl" type="text/xsl"?> <config> <auto_start>false</auto_start> <player_skin>/test.swf</player_skin> <main_title>Test</main_title> <playlist_title>PLAYLIST</playlist_title> <time_text>TOTAL TIME</time_text> <pan_labels>L,R</pan_labels> <scroller_speed>1</scroller_speed> <scroller_marquee_content>#TRACK_NAME#</scroller_marquee_content> <repeat_is_enabled>false</repeat_is_enabled> <shuffle_is_enabled>false</shuffle_is_enabled> <default_volume>75</default_volume> <default_pan>0</default_pan> <play_list> <item>test.mp3;Test Soundtrack</item> </play_list> </config> Hi, The above code is from an XML file and I added the <?xml line of code to the XML file, but doing so causes the whole page to no longer display the track information (just blank). Is there there a way I could modify that text to try and call it another way? Thanks Edited July 16, 2014 by hexcode Quote Link to comment https://forums.phpfreaks.com/topic/289944-why-might-this-addtional-xml-code-stop-page-from-loading/ Share on other sites More sharing options...
requinix Posted July 16, 2014 Share Posted July 16, 2014 (edited) Looking at your other thread, this XML is going to a Flash player right? So what "page" is going blank? Is it the page where you try to load this XML in your browser directly? Do you, in fact, have a /player.xsl that will transform the XML into something readable? Edited July 16, 2014 by requinix Quote Link to comment https://forums.phpfreaks.com/topic/289944-why-might-this-addtional-xml-code-stop-page-from-loading/#findComment-1485479 Share on other sites More sharing options...
hexcode Posted July 16, 2014 Author Share Posted July 16, 2014 Hi, Yes, it is. Just the music player's playlist is blank (which mean the XML file is not loading) when I add the additional <?xml tag to the top. The purpose of the .xsl tag is to now allow the xml page to be viewable if you use its url address. Part of the XSL file has: <meta http-equiv="refresh" content="0; url=http://www.mywebsite.com/"></meta> Quote Link to comment https://forums.phpfreaks.com/topic/289944-why-might-this-addtional-xml-code-stop-page-from-loading/#findComment-1485480 Share on other sites More sharing options...
requinix Posted July 16, 2014 Share Posted July 16, 2014 Then it seems like the player doesn't like the I'd say leave it out. Really, what's the harm in people looking at the XML? It's not like you can hide it from them anyways, and neither are you linking to it for a person to check... Quote Link to comment https://forums.phpfreaks.com/topic/289944-why-might-this-addtional-xml-code-stop-page-from-loading/#findComment-1485492 Share on other sites More sharing options...
hexcode Posted July 16, 2014 Author Share Posted July 16, 2014 That's true I guess. It just used to work of my previous music player so I was wondering why it was not working with this newer music player. Quote Link to comment https://forums.phpfreaks.com/topic/289944-why-might-this-addtional-xml-code-stop-page-from-loading/#findComment-1485493 Share on other sites More sharing options...
requinix Posted July 17, 2014 Share Posted July 17, 2014 So I found the player and had it decompiled. The part where it deals with the config XML looks like if (_root.xml != undefined) { _xml.load(_root.xml); } else { _xml.load("config.xml"); } _xml.onload = function (success) { var _local3 = 0; while (_local3 < this.firstchild.childnodes.length) { if (this.firstchild.childnodes[_local3].nodetype == 1) { if (this.firstchild.childnodes[_local3].nodename != "play_list") { o[this.firstchild.childnodes[_local3].nodename] = this.firstchild.childnodes[_local3].firstchild.nodevalue; } else { o[this.firstchild.childnodes[_local3].nodename] = new array(); var _local4 = 0; while (_local4 < this.firstchild.childnodes[_local3].childnodes.length) { if (this.firstchild.childnodes[_local3].childnodes[_local4].nodetype == 1) { o[this.firstchild.childnodes[_local3].nodename].push(this.firstchild.childnodes[_local3].childnodes[_local4].firstchild.nodevalue); } _local4++; } } } _local3++; }The part where it deals with "this.firstchild" is where it fails: by inserting the processing block, the first child is no longer the and the code starts to fall apart. tl;dr: the player reads the XML poorly. Quote Link to comment https://forums.phpfreaks.com/topic/289944-why-might-this-addtional-xml-code-stop-page-from-loading/#findComment-1485507 Share on other sites More sharing options...
hexcode Posted July 17, 2014 Author Share Posted July 17, 2014 Thank you for finding the reason out. Kind of had a feeling that line was causing the rest of the config.xml file to not load. Just wondering, are you experienced with Flash coding/modifying? There are three of four changes I need done to the player to make it work for me. I wanted to know if you could or would be interested in help me making them (although I'm very basic with flash) or might consider looking into making them (I have all the raw files I could send you)? Quote Link to comment https://forums.phpfreaks.com/topic/289944-why-might-this-addtional-xml-code-stop-page-from-loading/#findComment-1485522 Share on other sites More sharing options...
requinix Posted July 17, 2014 Share Posted July 17, 2014 No experience at all. It's just that reading code is easier than writing it. You may be able to get away with putting the . In general the placement shouldn't matter. Quote Link to comment https://forums.phpfreaks.com/topic/289944-why-might-this-addtional-xml-code-stop-page-from-loading/#findComment-1485591 Share on other sites More sharing options...
hexcode Posted July 20, 2014 Author Share Posted July 20, 2014 No such luck. Adding that closing tag didn't help. Thanks though. Quote Link to comment https://forums.phpfreaks.com/topic/289944-why-might-this-addtional-xml-code-stop-page-from-loading/#findComment-1485753 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.