Working with the dateChooser component

For my projectmanagement sofware I want to use the dateChooser component to implement a dynamic projectcalendar for each project. I’ve been able to customize the component for my specific needs as far as it goes with the standard parameters.

Now my problem, how do I loop through the calendar adding event data to specific dates?
I load XML data with the dates that has an events attatched to them like this:


<?xml version="1.0"?>
<calendar>
<date id="20040705" events="3" />
<date id="20040723" events="1" />
<date id="20040818" events="5" />
..
</calendar>

In fact, PHP retrieves the records from my MySQL database summing them up in the above XML format.
All I really need to do is looping through my dateChooser component calendar and mark out which date that has an event or more with some color or something.

I don’t need my calendar to display info about the events. All it has to say when clicking a date is how many events there are. Eventinfo will be displayed in a HTML popUp window.