Hi All
I have written an Arduino library for sending/receiving XBee packets (API mode). You can download the source at http://code.google.com/p/xbee-arduino/
Although it is designed for Arduino, it should be easily portable to any micro that supports C++, as it only depends on Serial read/write and the millis() function.
Currently it supports sending/receiving packets for both series 1 and 2 XBee and I plan to expand the API support soon. I have provided a few examples and tested on both series 1 and 2 radios.
Andrew