Store (unlimited?) History in XML

Hi there,

As a personal project, I’m working on a language-learning flash game.

I’m looking at the information I’ll need to store in various XML documents.

I’m implementing a ‘history’ feature whereby, for any given word in the database, for any given user, a comprehensive history of data is stored. With this data, I can generate all sorts of fancy graphs to track any given user’s progress.

For example:
You have been asked the word ‘cat’ 10 times. From data stored in the XML document, the game generates a graph of the time it took to answer each of those 10 times. (So in a perfect world, you see a nice downward curve. Congrats.)

My question is how to organise the XML document (if that’s the way to go with this) so that it is as efficient as possible.

Right now, I can only see the brute force approach: have a limited number of predefined history states (say 99), and write data to these each time ‘cat’ comes up. Once they’re full, overwrite.

So:

<user#>
   <word#321>
      <speed>
         <1>3</1>
         <2>2.7</2>
         ...
         <n-1>1.1</n-1>
         <n>1</n>
      </speed>
   </word#321>
</user#>

Is this the best way of going about it?

Is there a way of storing data in an unlimited number of history states?

Thanks in advance
Nick