TCP is stream-based, which means you send bytes without them necessarily being in a \"message\", so the receiver may get half a message or one and two thirds of messages.
Protocol Buffers, is less known that XMPP but may be of some interest in your case.
http://code.google.com/intl/en-US/apis/protocolbuffers/docs/overview.html