Generate events on stanza and stream open/close. Create Stanza and serialize them. Note: XML namespaces are not handled yet.