title: How to create a custom Iq stanza using smack in android
body: <p>I want to create an iq stanza like below to achieve MUC/SUB for MUC in ejabberd, as smack 4.2.3(android) is not providing any predefined function for MUC/SUB.</p>
  <pre><code> &lt;iq from='hag66@shakespeare.example'
          to='coven@muc.shakespeare.example'
          type='set'
          id='E6E10350-76CF-40C6-B91B-1EA08C332FC7'&gt;   
   &lt;subscribe xmlns='urn:xmpp:mucsub:0'
               nick='mynick'
               password='roompassword'&gt;
      &lt;event node='urn:xmpp:mucsub:nodes:messages'/&gt;
      &lt;event node='urn:xmpp:mucsub:nodes:affiliations'/&gt;
      &lt;event node='urn:xmpp:mucsub:nodes:subject'/&gt;
      &lt;event node='urn:xmpp:mucsub:nodes:config'/&gt;  
    &lt;/subscribe&gt; 
    &lt;/iq&gt;
  </code></pre>