php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17032 Results of "xpath_eval(...)" are not right in all cases
Submitted: 2002-05-06 03:53 UTC Modified: 2002-06-07 09:48 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: ggabriel at ets-online dot de Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4.2.0 OS: Win2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ggabriel at ets-online dot de
New email:
PHP Version: OS:

 

 [2002-05-06 03:53 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:02 UTC] derick@php.net
Please do not submit the same bug more than once.
 [2002-05-06 04:26 UTC] mfischer@php.net
Re-Opening (sample is right, no entities).
 [2002-06-07 06:35 UTC] bigredlinux at yahoo dot com
I have been married to this extension for the last several months, so I thought I would report some info.  The DOM extension as of 4.2.1 is behaving correctly, I get the expected 1 result for both queries.  Perhaps the user does not have a recent enough version of libxml2 (the extension was allowing this prior to php 4.2.1).  Anyway, this would not be a bug in the php extension even if it didn't work, but rather the underlying libraries and would be appropriate for the libxml2 mailing list.  Close this bug, it works.
 [2002-06-07 09:48 UTC] jtate@php.net
Fixed in 4.2.1 as reported by Dan.  If it is not, please reopen.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 18:01:35 2024 UTC