我正在尝试拆分字符串,但出现以下错误:
ban = Microsoft.VisualBasic.Strings.Split(xml, "<item jid='", -1,
Microsoft.VisualBasic.CompareMethod.Binary)
这是完整的代码
Dim ban As String
xml = xml.Replace("\\\", ")
If (xml.IndexOf("<query xmlns='http://jabber.org/protocol/muc#admin'>") >= 0) Then
If (xml.IndexOf("affiliation='outcast'") >= 0) Then
xml = xml.Substring(xml.IndexOf("<item jid='") + 11)
xml = xml.Replace("' affiliation='outcast' /></query></iq>", "").Replace("' affiliation='outcast' />", "")
xml = xml.Replace("role='participant' />", "")
ban = Microsoft.VisualBasic.Strings.Split(xml, "<item jid='", -1, Microsoft.VisualBasic.CompareMethod.Binary)
ListBox2.Items.Clear()
For t = LBound(ban) To UBound(ban)
ListBox2.Items.Add(ban(t))
info.Text = "List ban Count {" + ListBox2.Items.Count + "}"
Next
End If
End If