note 103058 added to simplexmlelement.construct

From: Date: Wed, 23 Mar 2011 06:50:21 +0000
Subject: note 103058 added to simplexmlelement.construct
Groups: php.notes 
Request: Send a blank email to php-notes+get-178114@lists.php.net to get a copy of this message
Using libxml_use_internal_errors() may suppress errors but Exception still requires decent handling. I used following code snippet. libxml_use_internal_errors(true); try{ $xmlToObject = new SimpleXMLElement($notSoWellFormedXML); } catch (Exception $e){ echo 'Please try again later...'; exit(); } ---- Server IP: 69.147.83.197 Probable Submitter: 203.110.238.16 ---- Manual Page -- http://www.php.net/manual/en/simplexmlelement.construct.php Edit -- https://master.php.net/note/edit/103058 Del: integrated -- https://master.php.net/note/delete/103058/integrated Del: useless -- https://master.php.net/note/delete/103058/useless Del: bad code -- https://master.php.net/note/delete/103058/bad+code Del: spam -- https://master.php.net/note/delete/103058/spam Del: non-english -- https://master.php.net/note/delete/103058/non-english Del: in docs -- https://master.php.net/note/delete/103058/in+docs Del: other reasons-- https://master.php.net/note/delete/103058 Reject -- https://master.php.net/note/reject/103058 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#178114) next »