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='[email protected]/street' to='pubsub.hill.valley'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <subscribe node='storm-updates' jid='[email protected]'/> </pubsub> </iq> <iq type='set' id='sub2' from='[email protected]/street' to='pubsub.hill.valley'> <pubsub xmlns='http://jabber.org/protocol/pubsub'> <subscribe node='doc-brown-weather-experiment' jid='[email protected]'/> </pubsub> </iq>
The subscription requests come back almost immediately:
<iq type='result' id='sub1' from='pubsub.hill.valley' to='[email protected]/street'> <pubsub xmlns='http://jabber.org/protocol/pubsub> <subscription...