Using XML for a simple webplayer Highscore Table

Hi, i’ve been searching around the interweb for days now trying to figure out XML read/write routines.
I’ve made a simple Pinball Game and exported it as a webplayer application, but i need a Highscore Table.
At first i thought a database would be the best approach. But for some reason ever since i heard of databases a few years ago, everytime i try to understand databases my brain shuts down.
So Saving/loading the scores from a read/write file seems better for me.

i’m thinking my XML would look something like:

<1stName>RandomName1</1stName>
<1stScore>123</1stScore>
<2ndName>RandomName2</2ndName>
<2ndScore>213</2ndScore>

… and so forth…

now to my question:
how do i get the values from the different XML elements assinged to variables and how do i overwrite the old values with the updated variables i get from playing?

it seems rather easy but for some reason i cant wrap my brain around it.

Thanks in advance! :slight_smile:

EDIT: I use UnityScript (JavaScript) By The Way

  1. Visit Google
  2. Enter “unity write text file”
  3. Press search button.
  4. Click first hit (or visit How do I write a line of text to a file? - Questions & Answers - Unity Discussions directly.)