Thanks, guys, for your responses.
I think you've both missed the thrust of my question. I have the XML side of things sorted. What I need to know is how to structure my data once I have read it in. The XML file might look something like:-
Code:
<examkeyfile>
<title>Test Exam Keyfile</title>
<paper type="Written" totalmark="63" passmark="80" method="cumulative">
<manualentry>Marks Awarded</manualentry>
</paper>
<paper type="Lab" totalmark="123" passmark="80" method="deduct">
<manualselect value="35">Basic Functionality Test</manualselect>
</paper>
<paper type="troubleshooting" totalmark="3" passmark="65" method="cumulative">
<manualselect value="1">Issue 1</manualselect>
<manualselect value="1">Issue 2</manualselect>
<manualselect value="1">Issue 3</manualselect>
</paper>
</examkeyfile>
In this case, I have a manual entry mark for the first paper which has an 80% passmark and a maximum total of 63. Paper 2 has a maximum mark of 123, again a pass mark of 80% but in this case the student starts with 100% and looses marks if things aren't met. The only mark (so far) is a functionality test, worth 35 marks and will require just an on/off tick-box. Paper three is again just tick-boxes, 3 off. 2 out of 3 required.
So, as I read this in, I'm goung to need to create an array of objects which contain a couple of integer properties and a few boolean. If the exam has marks for different things, then the objects created will need different properties.
Does that make sense?
Paul