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.