hi aal
i tryed the code below
and i receive the following error
also i have uploaded the following librarys
phone
XML2MAP
XUI and core
i tryed the code below
RSS feed with url:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
Private ParsedData As Map
End Sub
Sub Globals
Private ListView1 As ListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
Dim xm As Xml2Map
xm.Initialize
ParsedData = xm.Parse("http://feeds.bbci.co.uk/news/world/rss.xml")
End If
Activity.LoadLayout("1")
ListView1.SingleLineLayout.ItemHeight = 60dip
Dim rss As Map = ParsedData.Get("rss")
Dim channel As Map = rss.Get("channel")
Dim items As List = channel.Get("item")
For Each item As Map In items
Dim title As String = item.Get("title")
Dim link As String = item.Get("link")
ListView1.AddSingleLine2(title, link)
Next
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
Dim pi As PhoneIntents
StartActivity(pi.OpenBrowser(Value))
End Sub
i will apriciate if you can tell me what i am doing wrongLogger connected to: Xiaomi Redmi Note 5A Prime
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 24 (Xml2Map)
org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 5: not well-formed (invalid token)
at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:515)
at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:474)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:316)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:279)
at anywheresoftware.b4a.objects.SaxParser.parse(SaxParser.java:80)
at anywheresoftware.b4a.objects.SaxParser.Parse(SaxParser.java:73)
at b4a.example.xml2map._parse2(xml2map.java:255)
at b4a.example.xml2map._parse(xml2map.java:90)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at b4a.example.main.afterFirstLayout(main.java:105)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6393)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
also i have uploaded the following librarys
phone
XML2MAP
XUI and core