You are here: Limits to XPath implementaiton in PHP5 « All PHP « IT news, forums, messages
Limits to XPath implementaiton in PHP5

Posted by Weston on 10/22/07 21:58

Poking around with XPath using SimpleXML, it looks like there are at
least a few reasonably common XPath operators and predicates that
aren't supported. I'd like to check my observations against other
people's experience, and find out if I'm missing something.

Here's what it looks like to me in PHP 5.2.0:

* the count() predicate seems to fail quietly (no error or warning,
you just receive a false value from the xpath method rather than an
array)
* the "|" (union) operator seems to also fail quietly by returning an
empty array
* the "union" operator seems to cause an error
* the "intersect" operator also causes an error (and needless to say,
with | and count() not working, using something like the Kaysian
technique to get the intersection won't work)

Does this accurately capture the current state of things?

If so, are the bulk of developers simply not using these features, or
are they instead writing around the missing features in PHP rather
than trying to get XPath to do the work?

Or is there a better option?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация