Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>at first you must check that this collection is exist or not. you can do this with :</p> <pre><code>&lt;iq type='get' id='123456'&gt; &lt;list xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns' with='jabbar@localhost'&gt; &lt;set xmlns='http://jabber.org/protocol/rsm'&gt; &lt;max&gt;30&lt;/max&gt;/*max number of collection that you want to retrieve*/ &lt;/set&gt; &lt;/list&gt; &lt;/iq&gt; </code></pre> <p>response from ejabberd:</p> <pre><code>&lt;iq xmlns='jabber:client' from='root@localhost' to='root@localhost/24975890851351278205927376' id='123456' type='result'&gt; &lt;list xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns'&gt; &lt;chat with='jabbar@localhost/2021512663135182487476431' start='2012-10-24T13:45:17.000000Z'/&gt; &lt;chat with='jabbar@localhost/9286394041351135710472543' start='2012-10-25T20:09:13.000000Z'/&gt; &lt;chat with='jabbar@localhost/9286394041351135710472543' start='2012-10-25T21:22:13.000000Z'/&gt;/****** I will retrieve this *****/ &lt;chat with='jabbar@localhost/9286394041351135710472543' start='2012-10-25T22:05:13.000000Z'/&gt; &lt;chat with='jabbar@localhost' start='2012-10-25T23:03:14.000000Z'/&gt; &lt;chat with='jabbar@localhost' start='2012-10-25T23:35:37.000000Z'/&gt; &lt;set xmlns='http://jabber.org/protocol/rsm'&gt; &lt;first index='0'&gt; 63518305517@1 &lt;/first&gt; &lt;last&gt; 63518427337@15 &lt;/last&gt; &lt;changed&gt; 2012-10-25T23:37:21.000000Z &lt;/changed&gt; &lt;count&gt; 6 &lt;/count&gt; &lt;/set&gt; &lt;/list&gt; &lt;/iq&gt; </code></pre> <p>now for retrieving message from a collection you must input exactly "start" and "with" in request stanza:</p> <pre><code>&lt;iq type='get' id='433534536'&gt; &lt;retrieve xmlns='http://www.xmpp.org/extensions/xep-0136.html#ns' with='jabbar@localhost/9286394041351135710472543' start='2012-10-25T21:22:13.000000Z'&gt; &lt;set xmlns='http://jabber.org/protocol/rsm'&gt; &lt;max&gt;100&lt;/max&gt; &lt;/set&gt; &lt;/retrieve&gt; &lt;/iq&gt; </code></pre> <p>response:</p> <pre><code>&lt;iq xmlns='jabber:client' from='root@localhost' to='root@localhost/24975890851351278205927376' id='433534536' type='result'&gt; &lt;chat with='jabbar@localhost/9286394041351135710472543' start='2012-10-25T21:22:13.000000Z'&gt; &lt;from secs='0'&gt; &lt;body&gt; dddddddddd &lt;/body&gt; &lt;/from&gt; &lt;from secs='1'&gt; &lt;body&gt; dddddddd &lt;/body&gt; &lt;/from&gt; &lt;set xmlns='http://jabber.org/protocol/rsm'&gt; &lt;first index='0'&gt; 63518419333@103 &lt;/first&gt; &lt;last&gt; 63518419334@105 &lt;/last&gt; &lt;changed&gt; 2012-10-25T21:22:14.000000Z &lt;/changed&gt; &lt;count&gt; 2 &lt;/count&gt; &lt;/set&gt; &lt;/chat&gt; &lt;/iq&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload