|
Posted by google on 10/13/12 11:29
I am parsing xml responses from Amazon Web Service queries. The problem
is, the doc contains elements like
<lowestnewprice>
<formattedprice>4.99</formattedprice>
<amount>499</amount>
</lowestnewprice>
<lowestusedprice>
<formattedprice>2.99</formattedprice>
<amount>299</amount>
</lowestusedprice>
For now, I only want the lowest used price, but my parser is looking
for <amount>, and is returning me the first one. I considered putting
each instance into an array, but I cannot be sure that all the xml
trees for each product contain the same amount of elements. If a
product is not available new, maybe the first instance would be the
lowestusedprice, not the lowestnewprice as I normal.
How can I approach this, please..?
Navigation:
[Reply to this message]
|