Re: Dom and SimpleXml Xpath return types
| From: | Philip Fletcher | Date: | Wed, 03 Mar 2004 18:06:29 +0000 |
| Subject: | Re: Dom and SimpleXml Xpath return types | ||
| References: | 1 2 | Groups: | php.xml.dev |
| Request: | Send a blank email to php-xml-dev+get-344@lists.php.net to get a copy of this message | ||
Ah - that explains it. Is a full implementation of xpath planned before PHP5
goes gold? (and is my understanding of xpath correct wrt that
implementation? i.e. it'll return different type as appropriate?).
An opportunity to practice refactoring my code, when it's done, methinks:)
Philip
Rob Richards wrote:
>> >From my understanding of the XPath spec, there should be four return
> types:
>> NodeSet, number, string or boolean. Using either Dom or SimpleXml I don't
>> seem to be able to get anything except a NodeSet (either an object or an
>> array respectively).
>
> xpath is not fully implemented and is currently only returning nodesets.
>
> And pertaining to your earlier question, simplexml is only returning an
> array if it has a nodeset to return.
>
> Rob