#50951 [Opn->Fbk]: SimpleXml xpath doesn't return a ligitimate xpath query
ID: 50951
Updated by: jani@php.net
Reported By: arashaga at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Scripting Engine problem
Operating System: xp
PHP Version: 5.3.1
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2010-02-07 05:45:01] arashaga at gmail dot com
Description:
------------
in the example below I get the xpath query result in Xpath qury tools
like Xpath spy but when it's run in PHP I don't get anything.
it shoud output the storename but it doesn't.
Reproduce code:
---------------
//xml file (partially)
<Item>
<ItemID>341396747871</ItemID>
â
<ViewItemURLForNaturalSearch>
http://product.half.ebay.com/GMAT-Quantitative-Review-Paperback-2005_W0QQprZ48636818QQtgZvidetailsQQitemZ341396747871
</ViewItemURLForNaturalSearch>
<Quantity>1</Quantity>
â
<Seller>
<FeedbackScore>32</FeedbackScore>
<PositiveFeedbackPercent>100.0</PositiveFeedbackPercent>
</Seller>
<CurrentPrice currencyID="USD">1.98</CurrentPrice>
â
<Storefront>
â
<StoreURL>
http://shops.half.ebay.com/rogerlee14_W0QQsellerZrogerlee14
</StoreURL>
<StoreName>rogerlee14</StoreName>
</Storefront>
<Country>US</Country>
<HalfItemCondition>BrandNew</HalfItemCondition>
â
<SellerComments>
Brand new, never used. No markings at all. Ships fast!
</SellerComments>
</Item>
the query is
//CurrentPrice[.=1.98]/parent::Item/Storefront/StoreName
Expected result:
----------------
rogerlee14
Actual result:
--------------
boolean(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50951&edit=1
Thread (7 messages)