Hi all I'm using simplexml to parse some feeds. Sometimes simplexml returns an error because the feeds - for whatever reason - can't be parsed by simplexml. What I'd like is to discard the ugly errors that simplexml returns and display a custom error in stead. Could someone please help me with that? I've tried "or die()" and if(!$xml){} any help would be greatly appriciated! Thanks
Have you tried SimplePie? http://simplepie.org/ . It's essentially a framework for simplexml, makes things a whole lot easier. It can generate as well as consume RSS feeds. Theres plenty of tutorials and screencasts to help.
Hey Panzer Thanks for your reply. Unfortunately I'v built up my intire site using simplexml, so converting to simplepie is not really an option for me. I could ofcourse just turn off error reporting altogether, but it would seem rather strange for visitors if a particular feed just isn't showing...