Try do it by yourself. No, seriously, type in google XML and JavaScript, open the following link
Parsing XML Documents in JavaScript[
^] and if after this your code does not work by some reason, somebody can help you here to improve your code.
Good luck.