Re: [PHP-XML-DEV] Dom and SimpleXml Xpath return types
[email protected] (Philip Fletcher) Wed, 03 Mar 2004 18:06:29 +0000
| Newsgroups | php.xml.dev |
|---|---|
| Organization | Stutchbury |
| Message-ID | <[email protected]> |
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