I want to use the SaxParser to parse a string that contains XML code I got using the HTTPUtils.
Can you tell me how to convert the string I got from the HTTPUtils into an InputStream?
I tried to do this but it won't let me compile it:
B4X:
Sub JobDone (Job As String)
Dim strStringFromWebSite As String
Dim in As InputStream
If HttpUtils.IsSuccess(strUrlToCall) Then
strStringFromWebSite = HttpUtils.GetString(strUrlToCall)
in = strStringFromWebSite
XmlParser.Parse(in, "Parser")
in.Close
Else
ToastMessageShow("There was a problem getting a response from the web site.", False)
End If
End Sub
I was hoping for an answer to the original question. What if the XML is coming from a database and I read it into a string. How do I parse it from there?