Voting

: seven minus two?
(Example: nine)

The Note You're Voting On

kumarldh at gmail dot com
14 years ago
Using libxml_use_internal_errors() may suppress errors but Exception still requires decent handling. I used following code snippet.

<?php
libxml_use_internal_errors
(true);
try{
$xmlToObject = new SimpleXMLElement($notSoWellFormedXML);
} catch (
Exception $e){
echo
'Please try again later...';
exit();
}
?>

<< Back to user notes page

To Top