Thank you both for helping me. It's working.
I basically used @Barrands solution with @Muddy_Funster contribution in the last post. Temporary table wasn't even needed.
Thank you.
Thank you for both answers!
Additional question - XML has about 1000 products (524kB) and I have to update into MySql prices of about 200 products. Which of the solutions would be better to use? It seems that in Muddy_Funsters solution I would go through that XML at least ten thousand times?
Hello,
I want to search for a PRICE of product by his ID.
I have this unussual XML structure. I found some examples for XPath. But problem is, that in my XML id is not "parent" and price is not a "child". They are equal. Could somebody help me and show me, how to get a price if I know id of that product?
<eshop>
<product>
<id></id>
<name></name>
<price></price>
</product>
<product>
<id></id>
<name></name>
<price></price>
</product>
<SHOP>
<SHOPITEM>
<PRODUCT></PRODUCT>
<PRODUCT_SKU></PRODUCT_SKU>
<CATEGORYTEXT></CATEGORYTEXT>
<CATEGORIES>
<CATEGORY</CATEGORY>
<CATEGORY></CATEGORY>
</CATEGORIES>
<URL></URL>
<IN_STOCK></IN_STOCK>
<IMGURL></IMGURL>
<IMGURL_FULL></IMGURL_FULL>
<PRICE_VAT></PRICE_VAT>
</SHOPITEM>
<PRODUCT_SKU> is ID of product and I want to get <PRICE_VAT>.
XML has about 1000 products, I have to get price of about 200 products (and then save it
I couldn't find any example at google.
Let's say, that I have some generic XML file, feed of products from eshop. And I want to get value of <price> of product, which has <product_id> equal to 9631. How do I get it's price?
I'm using get_file_content and sometimes I get failed to open stream http, which isn't a problem, but displaying that message is a problem.
Can I turn it off (in a script, not in php.ini etc.)?
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.