Subscribing
Now that Marty has discovered these two useful nodes, he will need to subscribe to them. This is done rather simply, using the following stanzas:
<iq type='set' id='sub1' from='marty@mcfly.fam/street' to='pubsub.hill.valley'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <subscribe node='storm-updates' jid='marty@mcfly.fam'/> </pubsub> </iq> <iq type='set' id='sub2' from='marty@mcfly.fam/street' to='pubsub.hill.valley'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <subscribe node='doc-brown-weather-experiment' jid='marty@mcfly.fam'/> </pubsub> </iq>
The subscription requests come back almost immediately:
<iq type='result' id='sub1' from='pubsub.hill.valley' to='marty@mcfly.fam/street'> <pubsub xmlns='http://jabber.org/protocol/pubsub> <subscription...