B4X:
Private hd As HUD
Sub HandleList(Job As HttpJob)
If Job.Success = False Then
HD.ToastMessageShow("Error downloading list.", True)
HD.ProgressDialogHide
Return
End If
Dim Text As String
Text = job.GetString
Do While Text.IndexOf(">")>0
Dim StartTag As Int
Dim EndTag As Int
StartTag=Text.IndexOf("<")
EndTag=Text.IndexOf(">")+1
Dim S As StringBuilder
S.Initialize
S.Append(Text)
S=S.Remove(StartTag,EndTag)
Text=S.ToString
Loop
Dim p AsJSONParser
p.Initialize(Text)
Dim oItems As List
oItems =p.NextArray
Dim sStatus As String
Dim oRowMap As Map
Dim sErrorMsg As String
For i = 0 To oItems.Size - 1
oRowMap=oItems.Get(i)
sStatus=oRowMap.Get("sStatus")
sErrorMsg=oRowMap.Get("sErrorMsg")
Next
This my code work around
I need a xml parser
Last edited: