@tarn, thank you this is a good place to start, but the problem is that i need to do some counts like the ones in my sample output.
8:30,Male,23,1
8:31,Female,23,1
8:32,Female,30,4
8:33,Male,50,10
Also I am not sure where you parsing the xml messages in this code, can you please help with...