note 80180 deleted from function.simplexml-element-xpath by danbrown
| From: | danbrown@php.net | Date: | Wed, 16 Sep 2009 15:53:06 +0000 |
| Subject: | note 80180 deleted from function.simplexml-element-xpath by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160689@lists.php.net to get a copy of this message | ||
Note Submitter: fake_id_911 at yahoo dot com
----
$XML = new SimpleXMLElement("<nothing/>");
$xpath = "/a/b";
$testPath = $XML->xpath($xpath);
if(is_bool($testPath)){
print "it's a boolean!";
}
/*Xpath returns and array, and if the path is not there or there is no children, it will return an
empty array which is the same as false. FALSE in this case is an empty array, not a boolean!
*/