See, the XBee library has traditionally been hooked into the hardware serial lines on Arduino Pins 0 and 1. That means getting debugging information out of the device combination of an Arduino and an XBee is an exercise in frustration and annoyance. Sure, you can use blinking lights to tell you what is going on, but this is the 21st century. I have always written my own code to handle the XBee interaction because I wanted the serial port to provide status and control when I was working on a project. Additionally, Andrew's library is heavily c++ and all the classes, inheritance, and instances confused the heck out of me.
However, maybe with the inclusion of a modified software serial port, and the capability to use the additional ports on an Arduino Mega, now is the time to take a serious look at using it. I mean, if you have a mega, you can now put the XBee on Serial1 and keep Serial and Serial 2 for other things; this is just the ticket for converting RS485 into XBee packets to send over the air where you don't have wires. Heck, I can think of dozens of things.
So, here is my first voyage into the use of the library. I haven't linked in Paul's new serial library yet, I will on a future example, but I just wanted to understand what was going on and how to, at least, receive a packet and do something with it. I took one of Andrew's library examples and modified it substantially to include many of the things I need in using an XBee and commented the heck out of it so others stood a chance of understanding what was going on. It's amazing how few examples are out there that actually show what you need to do to do something along these lines.
I tried to get all the major items out of the packet so they could be displayed and even included a tiny routine to illustrate using the received data. This is what it looks like running:
You have to use the scrollbar at the bottom to see all of the message, but I wanted it that way instead of worrying about wrapping around. I also put in print routines for the hex data; I love being able to see it in both hex and ascii.
Grab it, modify it to your purpose, and have fun.