proggie7 Posted February 22, 2010 Share Posted February 22, 2010 Hi! data.xml <?xml version="1.0" encoding="utf-8" ?> <data> <menu> <item link="http://site.com/?param=1¶m=2">Title</item> </menu> </data> xmp_reader.php <?php $doc = new DOMDocument(); $doc->load( 'data.xml' ); ?> Error Warning: DOMDocument::load() [domdocument.load]: EntityRef: expecting ';' in file:///C:/Server/local.com/www/data.xml, line: 4 in C:/Server/local.com/www\xml_reader.php on line 3 I can see that "&" symbol is causing all the trouble. What can I do about it? Can I shield it, for example? Link to comment https://forums.phpfreaks.com/topic/192997-php-xml-error-when-reading-symbol/ Share on other sites More sharing options...
sader Posted February 22, 2010 Share Posted February 22, 2010 in xml change & > & Link to comment https://forums.phpfreaks.com/topic/192997-php-xml-error-when-reading-symbol/#findComment-1016396 Share on other sites More sharing options...
proggie7 Posted February 22, 2010 Author Share Posted February 22, 2010 It works! Thank you! Link to comment https://forums.phpfreaks.com/topic/192997-php-xml-error-when-reading-symbol/#findComment-1016405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.