In your xpath
-expressions, you need to select <product>
and keep the condition in []
:
/products/product[shipping/@carrier='$shippingCarrier']
and...
/products/product[shipping/@cost='$shippingCost']
Moreover, you need to set your $shippingCost
to "10.99"
instead of "UPS"
to select data.
see it working: https://eval.in/128925