Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting subtotals of an XML file

Status
Not open for further replies.

Dracosms

IS-IT--Management
Feb 26, 2004
21
BE
My current XML file looks like this:

Code:
<Order>
  <Customer>customer1 </Customer>
  <Amount> 20 </Amount>
</Order>
<Order>
  <Customer>customer1 </Customer>
  <Amount> 90 </Amount
</Order>
<Order>
  <Customer>customer2 </Customer>
  <Amount> 50 </Amount
</Order>

What kind of XSL expression should I use to get the (sub)totals of each customer ?
I know I can get the total of all order by " <xsl:value-of select='format-number(sum(//Order/Amount), "#######.00")'/> "

Can anyone help me ?

Greetz,

Dracosms
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top