Here's my XML
<ticket><sold>0</sold><price>7.00</price></ticket>
<ticket><sold>1</sold><price>7.00</price></ticket>
<ticket><sold>1</sold><price>7.00</price></ticket>
I want to sum the total sale prices, in this case it will be $14.00 because the 1st one does not sell any ticket
the tag will only have 2 values (1 or 0)
The simplest way I think of is to multiple price with sold for each ticket and then sum it all up.
I group by and below is my code but I got 0
0<?sum(current-group()/sold * current-group()/price)?>
Do you know why? If you have a simpler approach, please let me know
Thanks