For example, Juliet may log into the capulet.lit server and send presence:
Example 1. Presence Update
<presence from='juliet@capulet.lit/balcony'>
<status>Moping</status>
</presence>
/* skipped */
But the same functionality can be implemented more elegantly using pubsub:
Example 3. Presence Publish
<iq from='juliet@capulet.lit/balcony' type='set' id='pres1'>
<pubsub xmlns='
http://jabber.org/protocol/pubsub'>
<publish node='presence'>
<item>
<presence from='juliet@capulet.lit/balcony' xmlns='jabber:client'>
<status>Moping</status>
</presence>
</item>
</publish>
</pubsub>
</iq>
<iq to='juliet@capulet.lit/balcony' type='result' id='pres1'/>
http://xmpp.org/extensions/xep-0207.html
Обожаю расширяемые XML-based протоколы.