I am reading an xml in php using
simplexml_load_file . However while trying to load the xml it displays a list of warnings
How do I rectify to remove these warnings?
(XML is generated from url
http://..../index.php/site/projects & loaded into a variable in the test.php. I dont have write priveleges to index.php) | |||
36
|
The problem could be the "&"
will get rid of the "&" and replace it with it's HTML code version...give it a try.
| ||
17
|
Found this here ...
| ||||
|
2
|
The XML is invalid.
CDATA should be wrapped around all special XML characters, as per W3C
| ||
2
|
This is in deed due to characters messing around with the data. Using
htmlentities($yourText) worked for me (I had html code inside the xml document). See http://uk3.php.net/htmlentities. | ||
@
in front ofsimplexml_load_file
or by adding a flag, see the manual page ofsimplexml_load_file
for more information and please delete your question, it's a duplicate. – hakre Sep 29 '11 at 23:54