Here is my data document
<?xml version="1.0" ?>
<questionnaire AssessInd="Some Person" ProjectID="4">
<user id="2" position="somePosition" fname="Bruce" lname="Dickinson">
<cluster id="1" cdid="1" ccomp="2">
<title>Topic Area1</title>
<comment>comments on this topic here</comment>
<question id="1" qdid="1" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>5</importance>
<actual>5</actual>
</answer>
</question>
<question id="2" qdid="2" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>5</importance>
<actual>6</actual>
</answer>
</question>
<question id="20" qdid="3" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>6</importance>
<actual>5</actual>
</answer>
</question>
</cluster>
<cluster id="2" cdid="2" ccomp="2">
<title>Topic title 2</title>
<comment>comments for this topic</comment>
<question id="25" qdid="4" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>5</importance>
<actual>4</actual>
</answer>
</question>
<question id="26" qdid="5" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>5</importance>
<actual>4</actual>
</answer>
</question>
<question id="40" qdid="6" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>5</importance>
<actual>5</actual>
</answer>
</question>
</cluster>
</user>
<user id="7" position="somePosition" fname="Barry" lname="White">
<cluster id="1" cdid="1" ccomp="2">
<title>Topic Area1</title>
<comment>comments on this topic here</comment>
<question id="1" qdid="1" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>5</importance>
<actual>5</actual>
</answer>
</question>
<question id="2" qdid="2" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>5</importance>
<actual>6</actual>
</answer>
</question>
<question id="20" qdid="3" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>6</importance>
<actual>6</actual>
</answer>
</question>
</cluster>
<cluster id="2" cdid="2" ccomp="2">
<title>Topic title 2</title>
<comment>comments for this topic</comment>
<question id="25" qdid="4" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>6</importance>
<actual>4</actual>
</answer>
</question>
<question id="26" qdid="5" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>4</importance>
<actual>4</actual>
</answer>
</question>
<question id="40" qdid="6" qcomp="1">
<content>A question goes here</content>
<answer>
<importance>5</importance>
<actual>3</actual>
</answer>
</question>
</cluster>
</user>
</questionnaire>
Above xml is a snippet of my data document.
There will possibly be many more USER elements with many more CLUSTER elements with many more QUESTION and ANSWER elements.
The doc will most likely have about 15 user elements around 20 - 40 question elements which remain the same for each user, only the answer section will be different as it contains their answers.
There should be enough above for you to see how a bigger version of the same doc will look.
What I want to do is output the top 5 questions from all the user nodes firstly assessed on the data in the question/answer/importance
element. (a number between 1 and 6)
Then the same again but assessed on the question/answer/actual element. (a number between 1 and 6)
Then I would like to also select the bottom 5 questions from all the users..
again firstly assessed on question/answer/importance
followed by question/answer/actual
So what id like to end up with is 4 ordered lists showing the question (question/content) and the topic title (cluster/title) of the top five created from the importance, top 5 from the actual, bottom 5 from the importance and bottom 5 from the actual.
Can anyone help me with this? Its urgent, hence the 500pts.
Start Free Trial