I have 2 days trying to parse some XML string. Try XML2MAP and the old way with parse.
some assistance.
this is the xml
was using this code
some assistance.
this is the xml
B4X:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><AutorizaJugadaXmlResponse xmlns="http://tempuri.org/"><AutorizaJugadaXmlResult><![CDATA[<?xml version="1.0"?><RespuestaAuth><Autorizacion>038080C9-2943-46BF-3F1FCB7793</Autorizacion><Referencia>4EAEAE34-D602-477B-8AE8-F6284E50908A</Referencia><NumeroTicketPozo>479</NumeroTicketPozo><CodResp>0</CodResp><DescResp>Operacion Satisfactoria</DescResp></RespuestaAuth>]]></AutorizaJugadaXmlResult></AutorizaJugadaXmlResponse></s:Body></s:Envelope>
was using this code
B4X:
parser.Initialize
Dim in As InputStream
Dim b() As Byte
b = j.GetString.GetBytes("UTF8")
in.InitializeFromBytesArray(b,0,b.Length)
parser.Parse(in,"Parser")
Sub Parser_StartElement (Uri As String, Name As String, Attributes As Attributes)
End Sub
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
' Log($"${Uri} ${Name} ${Text}"$)
If parser.Parents.IndexOf("RespuestaAuth") > -1 Then
Log("llego algo")
If Name = "Autorizacion" Then
Log (Text.ToString)
Else If Name = "Referencia" Then
Log(Text.ToString)
Else If Name = "NumeroTicketPozo" Then
Log(Text.ToString)
End If
End If
End Sub