How to parse XMPP Chat History XML | Android
<p>I need to Parse the Chat History XML Response.
Here is XML - </p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;message to="user5@192.168.1.59/Smack" from="user5@192.168.1.59"&gt;
   &lt;result xmlns="urn:xmpp:mam:1"&gt;
      &lt;body&gt;helooooooooooooooooooooooooooooooooo&lt;/body&gt;
      &lt;thread&gt;sO678v&lt;/thread&gt;
      &lt;composing /&gt;
      &lt;delay /&gt;
   &lt;/result&gt;
&lt;/message&gt;
</code></pre>

<p>I need to get the value of <code>"to"</code> and <code>"from"</code> from above XML.</p>

<p>Please suggest me, what to do now.
Thanks in advance.</p>