Bug #50951 [NoF->Fbk]: SimpleXml xpath does not return proper xpath query

From: Date: Sun, 25 Apr 2010 18:07:44 +0000
Subject: Bug #50951 [NoF->Fbk]: SimpleXml xpath does not return proper xpath query
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-149881@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=50951&edit=1

 ID:               50951
 Updated by:       felipe@php.net
 Reported by:      arashaga at gmail dot com
 Summary:          SimpleXml xpath does not return proper xpath query
-Status:           No Feedback
+Status:           Feedback
 Type:             Bug
 Package:          Scripting Engine problem
 Operating System: xp
 PHP Version:      5.3.1

 New Comment:

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/




Previous Comments:
------------------------------------------------------------------------
[2010-02-21 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------
[2010-02-13 21:50:52] jani@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------
[2010-02-08 22:35:12] arashaga at gmail dot com

Actually instead of that whole "for and foreach" block we can use 
var_dump($rest);

and it will return bool(false).

------------------------------------------------------------------------
[2010-02-08 21:59:54] arashaga at gmail dot com

<?php

/*please use the xml feed that I have provided as an example instead 
of the ebay.xml*/
$xml = simplexml_load_file('ebay.xml');

 $xml-
>registerXpathNamespace('ebay','urn:ebay:apis:eBLBaseComponents');

 $resp = $xml-
>xpath("//ebay:CurrentPrice[.=1.98]/parent::Item/Storefront/StoreName"
);
 
for($i=0;$i < count($resp)/2; $i++ )
{
	
foreach($resp[$i] as  $key => $value)
{
	//echo "['".$key."']=".$value."<br>";
	echo "[$key]= $value<br>";
	
}
}
?>

------------------------------------------------------------------------
[2010-02-07 09:37:51] jani@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.



------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=50951


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=50951&edit=1


Thread (7 messages)

« previous php.bugs (#149881) next »