2levelsabove Posted November 10, 2008 Share Posted November 10, 2008 The feed is at : http://alltherides.com/feed.xml I used htmlentities on the description but still have errors that show up. please suggest. Thanks Link to comment https://forums.phpfreaks.com/topic/132197-what-can-i-do-to-validate-my-xml-feeds/ Share on other sites More sharing options...
harristweed Posted November 10, 2008 Share Posted November 10, 2008 start here http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Falltherides.com%2Ffeed.xml Find and remove the 'bad' charaters Link to comment https://forums.phpfreaks.com/topic/132197-what-can-i-do-to-validate-my-xml-feeds/#findComment-687090 Share on other sites More sharing options...
2levelsabove Posted November 10, 2008 Author Share Posted November 10, 2008 well the bad characters are characters like "." and " ' ". I tried doing htmlentities and even addslashes but that doesnt seem to do anything. Link to comment https://forums.phpfreaks.com/topic/132197-what-can-i-do-to-validate-my-xml-feeds/#findComment-687100 Share on other sites More sharing options...
harristweed Posted November 11, 2008 Share Posted November 11, 2008 I think that you are mistaken about which are the 'bad' characters. This is a line 338 taken from the validator"<description>please visit site<![CDATA[Very clean 2005 Honda Civic DX(Value Package), Low miles â\x80\x93 31,300, Auto Trans, Blue," '\x80' is the euro symbol I'm not sure what \x93 is but you can tell from the original code so you need to do a string replace i.e. $bad=array("\x80","\x93"); $good=array("€","?????"); $xml=str_replace($bad,$good,$xml); Also "please visit site" needs to be inside the cdata tags. Link to comment https://forums.phpfreaks.com/topic/132197-what-can-i-do-to-validate-my-xml-feeds/#findComment-687598 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.