php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17030 Results of "xpath_eval(...)" are not right in all cases
Submitted: 2002-05-06 03:50 UTC Modified: 2002-05-06 04:26 UTC
From: ggabriel at ets-online dot de Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.2.0 OS: Win2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 + 1 = ?
Subscribe to this entry?

 
 [2002-05-06 03:50 UTC] ggabriel at ets-online dot de
For the following sample:

<foo>
    <oops>
      some data
    </oops>
</foo>

the following problem occured:
$expr1 = "//foo";
$expr2 = "//*[name()='foo']";

$path1 = xpath_eval($context, $expr1); # no result ??? WRONG
$path2 = xpath_eval($context, $expr2); # one result !!! OK

The two expressions "//foo" and "//*[name()='foo']" should lead to the same result, but they do not.
I have turned Off all magic_quotes in php.ini .

It's to mention, that I use the PHP 4.2.0 Extensions for DOM XML support in my PHP 4.1.0 Version.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-06 04:26 UTC] mfischer@php.net
Bogussing in favour of #17032 which has the sample right (no entities).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC