View Single Post
  #2 (permalink)  
Old 22-11-04
Rich Rich is offline
Super Moderator
 
Join Date: Aug 2003
Posts: 2,451
Thanks: 0
Thanked 0 Times in 0 Posts
Rich is an unknown quantity at this point
It could be its invalid XML, try opening it directly with IE and see if it can parse it.

I think it could be the &'s that are causing the problem as I think the need encoding to & amp ; unless they are in a CDATA value.

If you are loading the xml into a string before parsing it, you could try doing a str_replace/preg_replace first to change the characters to something that you can then change back later.

If you're using PHP5 the simplexml functions are good for processing xml files. You probably won't want to change your parser due to having to change other parts of the script, but it will give you friendly(ish) errors if the xml is invalid (just try $xml=simplexml_load_file($location-of-xml-file); and it will give you some warnings if there are problems)
Reply With Quote