title: SimpleXML throwing warnings - how to catch?
body: <p>I'm having some trouble determining what's going on with <code>simplexml_load_string()</code>  I'm using the below code to render some XML.... when I run this code I get error messages like:</p>
  
  <pre><code>Message: simplexml_load_string() [function.simplexml-load-string]: Entity: line 94: parser error : Opening and ending tag mismatch: meta line 15 and head
  </code></pre>
  
  <p>Any ideas on how I can catch these warnings?  <code>libxml_get_errors</code> has no affect.</p>
  
  <pre><code>                $response = simplexml_load_string($response);
                  var_dump($response);
                  if (count(libxml_get_errors()) &gt; 0) {
                      print_r(libxml_get_errors());
                  }
  
                  if (is_object($response)) { //returns true when warnings are thrown
                      //process response
                  } else {
                      //record error
                  }
  </code></pre>