#41974 [Bgs]: xpath query searchs only first attributes
| From: | netdur at gmail dot com | Date: | Thu, 12 Jul 2007 22:46:10 +0000 |
| Subject: | #41974 [Bgs]: xpath query searchs only first attributes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-115008@lists.php.net to get a copy of this message | ||
ID: 41974
User updated by: netdur at gmail dot com
Reported By: netdur at gmail dot com
Status: Bogus
Bug Type: DOM XML related
Operating System: Ubuntu
PHP Version: 5.2.3
New Comment:
yes right! my mistake... a follow (for Googlers)
http://mail.gnome.org/archives/xml/2007-July/msg00024.html
Previous Comments:
------------------------------------------------------------------------
[2007-07-12 11:51:08] rrichards@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Output is correct. read up on the conversion of nodesets to strings in
the xpath specs
------------------------------------------------------------------------
[2007-07-12 00:12:02] netdur at gmail dot com
Description:
------------
let's say we have XML document has line that looks like this
<elem attr="_str_"/>
using xpath query "//*[contains (@*, 'str')]" will find that element,
however if that XML line looks like this
<elem id="123" attr="_str_"/>
xpath will fail finding the element!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41974&edit=1