Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c
| From: | Adam Maccabee Trachtenberg | Date: | Mon, 01 Dec 2003 17:51:38 +0000 |
| Subject: | Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-5922@lists.php.net to get a copy of this message | ||
On Mon, 1 Dec 2003, Stanislav Malyshev wrote:
> AMT>> $s = simplexml_load_file('file.xml');
> AMT>> $s->person->xsearch('/my/xpath/query');
>
> This makes fetch for read.
I'm with Andi and George. We should just fix SimpleXML to return
strings instead of objects when there are no descendant nodes.
Then, $s->person would return an object if there were other nodes to
examine and a string if it was the leaf.
-adam
--
adam@trachtenberg.com