I used python with xmpppy library to send and receive XMPP messages. The example code in my repository can send back Raspberry Pi's CPU temperature if you reply to the card with a message that includes "temperature". The only thing you need to change is the XMPP address and password.
If you want to know more about the xmpppy library. a_practical_guide_to_xmpppy.pdf is a good start.This guide was first published on Aug 15, 2013. It was last updated on Aug 15, 2013. This page (Set XMPP on Raspberry Pi) was last updated on May 04, 2015.