Sub Process_Globals
'-----------------------------
Dim WebSearch As HttpJob
'-----------------------------
Dim parser As SaxParser
End Sub
Sub Globals
Dim SiteToRead = "http://www.bishmedia.co.uk/default/Apps/xmldata.xml"
Dim ListView1 As ListView
Dim Title As String
Dim ItemSelected As String
Dim bandname As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
WebSearch.Initialize("WebSearch",Me)
parser.Initialize
WebSearch.Download(SiteToRead)
Activity.LoadLayout("listviewtest")
End Sub
Public Sub JobDone (Job As HttpJob)
'-----------------------------
Dim j As InputStream
'-----------------------------
If Job.Success = True Then
j = Job.GetInputStream
parser.Parse(j, "parser")
End If
End Sub
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
If parser.Parents.IndexOf("result") > -1 Then
If Name = "bandName" Then
Title = Text.ToString
ListView1.AddSingleLine2(Title, bandname)
End If
End If
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
ItemSelected = Value
Msgbox(ItemSelected,"Clicked on")
End Sub