Hi all, i wonder how can i get my file to be utf-8 and xml compliant. I've tried some validators, but they gives different errors, so i'm a bit confused. At the moment this xml feed my mp3 player with path for mp3s but it stops every time there's a strange char (like ' " )in the song title. In the example below the first song don't work, the second does.
I've been told that the secret lies in having the file to be completely UTF-8 compliant, but then again, i'm not sure how.
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <player autoStart="yes" productId="78" cPath="" artist_id="68" keywords="" bpm_id="" categories_id="" vocals_id="" mood_id="" page_name="index.php"> <song path="stream_song.php?song=download/La_Belle_Alliance/Lost_Recreation/hifi/04 - Test Artist - Don't Put Me Under Pressure.mp3" title="04 - Test Artist - Don't Put Me Under Pressure " /> <song path="stream_song.php?song=download/La_Belle_Alliance/Lost_Recreation/hifi/05 - Test Artist - The Ladders To Heaven.mp3" title="05 - Test Artist - The Ladders To Heaven " /> </player>
I think the OP actually wants to produce XML, not XHTML. In that case you'd need to dump the DOCTYPE (which refers to the vocabulary an XHTML document should conform to). You also don't need to validate - your document should of course be well formed, but it can't be validated as you're not providing a schema to validate it against.
If you really are having UTF-8 problems then how are you generating the file? If you're hand coding it then you need to make sure that your editor is saving it in UTF-8 format.