If you use PHP with SimpleXml to parse xml you may run across a strange issue where SimpleXml fails to parse perfectly formatted xml. You’ll likley get an error like this
Warning: simplexml_load_string() [function.simplexml-load-string]:
Entity: line 1: parser error : AttValue: " or ' expected
Chances are the PHP server has ‘magic quotes‘ turned on. To get around the issue, add a strip slashes command to the xml string before parsing it. So your php would change from
$xml = simplexml_load_string($xmlstr); to
$xml = simplexml_load_string(stripslashes($page));Hope that helps someone, frustrating bug to track down.
Helped me! Thanks!
Thanks Buddy…dis issue has wasted 6 hours of my time…
thankssss a lottttttttttttttttt
I nearly cried of anger, Now I am crying of joy !
You are the boss
Not working Man
Thank you so much. You made me get sleep tonight.