Any of you guys know Xquery?
I've got a question.
I have this xml :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="class6.xsl" type="text/xsl" ?>
<universite>
<etudiant>
<nom>Rejean Tremblay</nom>
<cours sigle="INF8430" note="89" />
<cours sigle="INF1030" note="69" />
<cours sigle="INF1230" note="75" />
</etudiant>
<etudiant>
<nom>Martin Lambert</nom>
<cours sigle="INF8430" note="75" />
<cours sigle="INF1030" note="72" />
<cours sigle="INF1230" note="73" />
</etudiant>
<etudiant>
<nom>Luc Alain</nom>
<cours sigle="INF9430" note="39" />
<cours sigle="INF1030" note="89" />
<cours sigle="INF1230" note="79" />
</etudiant>
<etudiant>
<nom>Olive Saint-Amant</nom>
<cours sigle="INF8430" note="91" />
<cours sigle="INF1230" note="99" />
</etudiant>
</universite>
I am trying to calculate the avg "note" for each "sigle"
Ex. For INF8430 It'd be the avg of 89+75+91.
I'm stomp. I can count the avg of all notes but I can't find a way to calculate only the avg for each sigle.
Anyone have an idea?
Nothing?
Quote from: Grey Fox on April 20, 2011, 12:41:09 PM
Nothing?
http://stackoverflow.com/questions/tagged/xquery