note 77747 added to function.dom-domxpath-query
| From: | jbarnett at flowershopnetwork dot com | Date: | Tue, 11 Sep 2007 20:46:18 +0000 |
| Subject: | note 77747 added to function.dom-domxpath-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-130382@lists.php.net to get a copy of this message | ||
The order of nodes in the return value is not guaranteed.
When my code was on an old server, the returned DOMNodeList was in document order. On the new
server, the returned DOMNodeList is in a consistent order, but it is not in document order.
PHP passes this function call off to the xmlXPathEvalExpression() function in libxml. That function
in libxml only accepts two arguments - the same two this PHP function accepts. There must have been
a change in the libxml version from the old server to the new server, and that libxml behaves
differently.
This would be okay if PHP had a way to compare nodes so I can resort the nodes manually, but there
is not.
So, there is no guaranteed way to get an ordered list of nodes like DOM 3 XPath provides.
----
Server IP: 69.147.83.197
Probable Submitter: 71.159.54.54
----
Manual Page -- http://www.php.net/manual/en/function.dom-domxpath-query.php
Edit -- https://master.php.net/note/edit/77747
Del: integrated -- https://master.php.net/note/delete/77747/integrated
Del: useless -- https://master.php.net/note/delete/77747/useless
Del: bad code -- https://master.php.net/note/delete/77747/bad+code
Del: spam -- https://master.php.net/note/delete/77747/spam
Del: non-english -- https://master.php.net/note/delete/77747/non-english
Del: in docs -- https://master.php.net/note/delete/77747/in+docs
Del: other reasons-- https://master.php.net/note/delete/77747
Reject -- https://master.php.net/note/reject/77747
Search -- https://master.php.net/manage/user-notes.php