Jump to content

should this work, or am i stupid?


Recommended Posts



i was going through a tutorial on how to display xml data on a website.  here is my xml output from my music player:


  <?xml version="1.0" encoding="UTF-8" ?> 
- <hmm status="ok">
- <tracks>
- <track>
  <album>Sixteen Stone</album> 
  <filename>D:\Temp\Music\h07 - Machinehead.mp3</filename> 
  <mood /> 
  <situation /> 
  <publisher /> 
  <format>MPEG Audio 128 kbps</format> 


here is the code that i thought would display the artists name:


<xml ID="music" src="http://localhost:8181/1.0/?method=player.getNowPlayingData"></xml>		
<span datasrc="music" datafld="artist"></span>




should this work?

Link to comment
Share on other sites

your problem is being stupid lol joking





localhost is your local computer ip.. for me localhost shows my website.. running on my computer u gotta use a real ip address or your domain name

Link to comment
Share on other sites

Good song.  I am willing to bet that the media player isn't attached to a publicly facing server.  I'd bet you are using localhost for this. 




into your browser window to make sure you get the xml out.


Then fix your problem and replace:


<span datasrc="music" datafld="artist"></span>




<span datasrc="#music" datafld="artist"></span>

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

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

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.