I used to save XML file to device then parse it using XMLSax library. But now I want to parse XML file directly with this code:
The code compiled without error but it display like the screenshot below, I just wonder what's wrong here?
B4X:
Sub http_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Dim result As InputStream
result = Response.GetInputStream
parser.Parse(result, "Parser")
End Sub
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
If parser.Parents.IndexOf("Item") > -1 Then
If Name = "Time" Then
Time.Text = Text.ToString
Else If Name = "Desc" Then
Desc.Text = Text.ToString
ListView1.AddTwoLines(Time, Desc)
End If
End If
End Sub
The code compiled without error but it display like the screenshot below, I just wonder what's wrong here?