XML, PHP and looping

Hi,
I’m a bit stuck with a XML document I have. I can loop through the top level nodes and get the data out ok, but one of these nodes has more nodes inside it, and this has me puzzled.
The XML is basically a list of employees, with each employee having a code, type, location and a history, which consists of a list of jobs, each with start and end date.Here’s an example.


[COLOR=#0000ff][COLOR=#0000ff]<employees[/COLOR]>[/COLOR]
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///U:/local-html/ukholidays/holidays.xml#) [COLOR=#0000ff]<[/COLOR][COLOR=#990000]employee[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]empcode[/COLOR][COLOR=#0000ff]>[/COLOR]**1**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]empcode[/COLOR][COLOR=#0000ff]>[/COLOR] 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]type[/COLOR][COLOR=#0000ff]>[/COLOR]**Manager**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]type[/COLOR][COLOR=#0000ff]>[/COLOR] 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]location[/COLOR][COLOR=#0000ff]>[/COLOR]**London**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]location[/COLOR][COLOR=#0000ff]>[/COLOR] 
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///U:/local-html/ukholidays/holidays.xml#) [COLOR=#0000ff]<[/COLOR][COLOR=#990000]history[/COLOR][COLOR=#0000ff]>[/COLOR]
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///U:/local-html/ukholidays/holidays.xml#) [COLOR=#0000ff]<[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
    [COLOR=#0000ff]<[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR]**29-10-2006**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR] 
    [COLOR=#0000ff]<[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR]**31-10-2006**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR] 
   [COLOR=#0000ff]</[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///U:/local-html/ukholidays/holidays.xml#) [COLOR=#0000ff]<[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
    [COLOR=#0000ff]<[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR]**12-11-2006**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR] 
    [COLOR=#0000ff]<[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR]**14-11-2006**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR] 
[COLOR=#0000ff]</[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///U:/local-html/ukholidays/holidays.xml#) [COLOR=#0000ff]<[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
    [COLOR=#0000ff]<[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR]**08-04-2007**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR] 
    [COLOR=#0000ff]<[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR]**10-04-2007**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR] 
 [COLOR=#0000ff]</[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
[COLOR=#0000ff]</history>[/COLOR]
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///U:/local-html/ukholidays/holidays.xml#) [COLOR=#0000ff]<[/COLOR][COLOR=#990000]employee[/COLOR][COLOR=#0000ff]>[/COLOR]
[COLOR=#0000ff]<[/COLOR][COLOR=#990000]employee[/COLOR][COLOR=#0000ff]>[/COLOR] 
[COLOR=#0000ff]<[/COLOR][COLOR=#990000]empcode[/COLOR][COLOR=#0000ff]>[/COLOR]**2**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]empcode[/COLOR][COLOR=#0000ff]>[/COLOR] 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]type[/COLOR][COLOR=#0000ff]>[/COLOR]**PA**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]type[/COLOR][COLOR=#0000ff]>[/COLOR] 
[COLOR=#0000ff]<[/COLOR][COLOR=#990000]location[/COLOR][COLOR=#0000ff]>[/COLOR]**NYC**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]location[/COLOR][COLOR=#0000ff]>[/COLOR] 
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///U:/local-html/ukholidays/holidays.xml#) [COLOR=#0000ff]<[/COLOR][COLOR=#990000]history[/COLOR][COLOR=#0000ff]>[/COLOR]
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///U:/local-html/ukholidays/holidays.xml#) [COLOR=#0000ff]<[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
    [COLOR=#0000ff]<[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR]**15-01-2003**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR]
    [COLOR=#0000ff]<[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR]**31-10-2004**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR] 
[COLOR=#0000ff]</[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///U:/local-html/ukholidays/holidays.xml#) [COLOR=#0000ff]<[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
    [COLOR=#0000ff]<[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR]**12-11-2006**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR]**14-11-2006**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR] 
[COLOR=#0000ff]</[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
[COLOR=#0000ff]<[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR]**08-04-2007**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]startdate[/COLOR][COLOR=#0000ff]>[/COLOR] 
 [COLOR=#0000ff]<[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR]**10-04-2007**[COLOR=#0000ff]</[/COLOR][COLOR=#990000]enddate[/COLOR][COLOR=#0000ff]>[/COLOR] 
[COLOR=#0000ff]</[/COLOR][COLOR=#990000]job[/COLOR][COLOR=#0000ff]>[/COLOR]
[COLOR=#0000ff]</history>[/COLOR]
[COLOR=#0000ff]</[/COLOR][COLOR=#990000]employee[/COLOR][COLOR=#0000ff]>[/COLOR]
[COLOR=#0000ff][COLOR=#0000ff][COLOR=#0000ff]</employees[/COLOR]>[/COLOR][/COLOR]

The problem I am trying to solve is looping through the history of each employee and getting the data out. The history could have little or many jobs in.

Any pointers? Cheers.