Basic building blocks of XMPP communication
This may come as a shock, but communications in XMPP come via just three (that's right three) top-level elements. These pieces of communication are called stanzas, and by sending sets of these with various contents, we can achieve everything we need to with XMPP. These top-level elements are:
<presence/>
: For sending the connection status of a client (online, offline, away, and so on)<message/>
: Used to send messages or alerts<iq/>
: The Information Query, or IQ, is for handling, setting and retrieval of information
In the following section, we'll talk about each of these in turn so that you can gain an overall understanding of what they are designed for and how they are used. Later in the chapter, we'll delve into XMPP communications just a little deeper, but for now let's cover these three important areas.