i searched a lot about method enable me to load XML file to sqlite
itried this code
and my xml code is
i hope find solution
thank in advance
itried this code
B4X:
Dim xm As Xml2Map
xm.Initialize
Dim root As Map = xm.Parse(File.ReadString(File.DirRootExternal, "css2.xml"))
Dim mp As Map= root.Get("NewDataSet")
Dim entries As List = mp.Get("Table")'<----error line
DBUtils.InsertMaps(SQL, "css2", entries)
and the error was<?xml version="1.0" encoding="UTF-8"?>
<NewDataSet>
<Table>
<sq>10002134</sq>
<nm>eeeeeee</nm>
<ar>56</ar>
<crd>02110050704</crd>
<crdtyp>1</crdtyp>
<ph>0</ph>
<dlv>0</dlv>
<gr>2</gr>
<mr>0</mr>
<dc>0</dc>
<nw>0</nw>
<prntd>6</prntd>
</Table>
</NewDataSet>
i tried to modify the XML file but no benefitCaused by: java.lang.RuntimeException: java.lang.ClassCastException: anywheresoftware.b4a.objects.collections.Map$MyMap cannot be cast to java.util.List
i hope find solution
thank in advance
Last edited: