note 81976 added to function.dom-domdocument-loadxml

From: Date: Sat, 22 Mar 2008 01:00:32 +0000
Subject: note 81976 added to function.dom-domdocument-loadxml
Groups: php.notes 
Request: Send a blank email to php-notes+get-137313@lists.php.net to get a copy of this message
For some reason, when you set DOMDocument's property 'recover' to true, using '@' to mask errors thrown by loadXml() won't work. Here's my workaround: function maskErrors() {} set_error_handler('maskErrors'); $dom->loadXml($xml); restore_error_handler(); You could also simply do this: error_reporting(0); and then set back error_reporting to its original state. ---- Server IP: 66.207.199.35 Probable Submitter: 70.81.170.125 ---- Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-loadxml.php Edit -- https://master.php.net/note/edit/81976 Del: integrated -- https://master.php.net/note/delete/81976/integrated Del: useless -- https://master.php.net/note/delete/81976/useless Del: bad code -- https://master.php.net/note/delete/81976/bad+code Del: spam -- https://master.php.net/note/delete/81976/spam Del: non-english -- https://master.php.net/note/delete/81976/non-english Del: in docs -- https://master.php.net/note/delete/81976/in+docs Del: other reasons-- https://master.php.net/note/delete/81976 Reject -- https://master.php.net/note/reject/81976 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#137313) next »