in xml gereftane liste block to ye buttone bezar
- Code:
<iq type='get' id='imanking'><block xmlns='urn:xmpp:blocking'></block></iq>
- Code:
If (a.IndexOf("<blocklist xmlns='urn:xmpp:blocking'>") >= 0) Then
a = a.Substring(a.IndexOf("<item jid='") + 11) '
a = a.Replace("' </blocklist></iq>", "").Replace("' </blocklist></iq>", "")
a = a.Replace("' />", "")
a = a.Replace("</blocklist></iq>", "")
Dim idz() As String
idz = Split(a, "<item jid='", -1) ' araye ro ba in text split kon va
ListBox2.Items.Clear() 'lixtbox ro pak kon
For i = LBound(idz) To UBound(idz) ' halghe ijad kon
ListBox2.Items.Add(idz(i)) ' itemaro tu listbox ezafe kon
Next i
End If