Jump to content

Why might this addtional XML code stop page from loading?


hexcode

Recommended Posts

<?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 by hexcode
Link to comment
Share on other sites

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 by requinix
Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.