note 85114 added to simplexml.examples

From: Date: Fri, 15 Aug 2008 09:17:02 +0000
Subject: note 85114 added to simplexml.examples
Groups: php.notes 
Request: Send a blank email to php-notes+get-143519@lists.php.net to get a copy of this message
To take care of proper error checking, one must use try-catch blocks: try { $sxe = new SimpleXMLElement($xmlstring); } catch (Exception $e) { echo "bad xml"; } To get rid of warnings, use @ in front of new: try { $sxe = @new SimpleXMLElement($xmlstring); } catch (Exception $e) { echo "bad xml"; } ---- Server IP: 62.237.7.3 Probable Submitter: 83.145.204.57 ---- Manual Page -- http://www.php.net/manual/en/simplexml.examples.php Edit -- https://master.php.net/note/edit/85114 Del: integrated -- https://master.php.net/note/delete/85114/integrated Del: useless -- https://master.php.net/note/delete/85114/useless Del: bad code -- https://master.php.net/note/delete/85114/bad+code Del: spam -- https://master.php.net/note/delete/85114/spam Del: non-english -- https://master.php.net/note/delete/85114/non-english Del: in docs -- https://master.php.net/note/delete/85114/in+docs Del: other reasons-- https://master.php.net/note/delete/85114 Reject -- https://master.php.net/note/reject/85114 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#143519) next »