Hello
In my list i have
With :
I can get bid and ask values but i cant get the symbol value. Symbol is different from other it has a = instead of ->
How can i get the Symbol value here ?
BTW : normally the data is like this :
I use this code to get bid and ask but i cant get the symbol
Thanks
In my list i have
B4X:
"NSMapTable {\n[1] Last -> 03:37:14\n[2] Ask -> 1.22961\n[3] High -> 1.2365\n[9] Attributes -> (read only map) {\n Symbol = GBPUSD;\n}\n[10] Bid -> 1.22928\n[12] Low -> 1.22886\n[15] Direction -> -1\n}\n",
With :
B4X:
For Each item As Map In m2
Dim title As String = item.Get("Bid")
Dim link As String = item.Get("Ask")
Next
I can get bid and ask values but i cant get the symbol value. Symbol is different from other it has a = instead of ->
How can i get the Symbol value here ?
BTW : normally the data is like this :
B4X:
<Rates>
<Rate Symbol="EURUSD">
<Bid>1.05154</Bid>
<Ask>1.05179</Ask>
<High>1.05765</High>
<Low>1.04796</Low>
<Direction>-1</Direction>
<Last>03:38:55</Last>
</Rate>
I use this code to get bid and ask but i cant get the symbol
B4X:
Dim xm As Xml2Map
xm.Initialize
ParsedData = xm.Parse(File.ReadString(File.DirTemp, "ratesxml2.xml"))
'Log(ParsedData)
Dim m1 As Map = ParsedData.Get("Rates")
LogColor(m1,Colors.blue)
Dim m2 As List
m2 = m1.Get("Rate")
Log(m2)
For Each item As Map In m2
Dim title As String = item.Get("Bid")
Dim link As String = item.Get("Ask")
Log(title & link)
Next
Thanks
Last edited: