Sum of values from xml file using JSTL -


i'm using jstl in jsp page read xml file

everything works perfect , i'm able loop through file , read values using code

<x:foreach select="$resultatxml/users/user" var="user">         <tr>             <td><x:out select="$user/@num"></x:out></td>             <td><x:out select="$user/name"></x:out></td>             <td><x:out select="$user/credit"></x:out></td>         </tr>        </x:foreach> 

what want sum of $user/credit of rows, couldn't because gives me error when try set variable with

<x:set var="credit" select="$user/credit" scope="page"/> <c:out value="${pagescope.credit }"/> 

it gives me

[[credit: null]] 

all want sum of credits


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -