note 110697 deleted from simplexml.examples-errors by danbrown
| From: | danbrown@php.net | Date: | Thu, 06 Dec 2012 14:13:45 +0000 |
| Subject: | note 110697 deleted from simplexml.examples-errors by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-192306@lists.php.net to get a copy of this message | ||
Note Submitter: Christoph
----
As an extension to the comment before from openbip at gmail dot com:
To avoid that an empty object as a result from an XML like <root /> is also regarded as a
failure, even though nothing went technically wrong you can also check:
<?php
if (!($sxe instanceof SimpleXMLElement)) {
//Something went wrong.
}
?>