I\'ve developed a chat app using XMPPframwork of Robbie Hanson and Openfire server. I can chat one to one and chat group successfully. But when I get history of chat, I can\
Follow this format, it works for me perfectly,
<iq id='a5sV8-21' type='set'>
<query xmlns='urn:xmpp:mam:0' queryid="12345678">
<x xmlns="jabber:x:data" type="submit">
<field var="FORM_TYPE" type="hidden"><value>urn:xmpp:mam:0</value></field>
<field var="with"><value>id@domain</value></field>
</x>
<set xmlns="http://jabber.org/protocol/rsm">
<max>message_count</max>
</set>
</query>
</iq>
** If xmpp:mam:0 doesn't work use xmpp:mam:1