Loading xml data into arrays - Please help

Hi I have been trying for the last two days to make these arrays so that I can manipulae the data.

The file loads fine and I can load the different ellements into a text field.

there are many courses element - below is an example of one

I think I need a recursive function but I can not get it to work. Help please

<?xml version=“1.0” encoding=“UTF-8” standalone=“yes”?>
<coursesSummary>
<courses>
<year>2009</year>
<quarter>1</quarter>
<region>Central Courses</region>
<coursecode>3634500</coursecode>
<coursetitle>Great course</coursetitle>
<coursesrun>1</coursesrun>
<maxplaces>10</maxplaces>
<numberattended>9</numberattended>
<splitbyregion>no</splitbyregion>
<centralreport>yes</centralreport>
</courses>
//courses elements are are repeated here
</coursesSummary>