Need Help using Xbee zb modules with pic microcontrollers

I am working on building a wireless light system, consisting of a lighting circuit and a switch. I am going to be using the xbee modules to communicate between two pic microcontrollers wirelessly. The switch will be a zigbee end point, while the lighting circuit will be the zigbee coordinator. I have looked at configuring the xbee modules, and find it to be achievable. Unfortunately I am having problems figuring out how to program the pic microcontrollers to work with the xbee modules. I am using the pic18f26k20 and I am programming them using C programming language. I have been searching for example of C codes for microcontrollers working with xbee modules but cant seem to find any, can anyone please reffer me to some.