Nobody likes to parse XML. Parsing JSON is simple and fun. Parsing XML is tedious and boring. That is the reason behind the Xml2Map class. It internally parses the XML document and returns a Map with the parsed data. It is similar to parsing JSON. Tip: You can use this tool to help you with...
<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">-->
<properties>
<entry key = "0"> toast </entry> <------------------------- i can't read the first line
<entry key = "1"> sandwich </entry>
<entry key = "2"> salad </entry>
when i start the program i have no errors but it indicates that xm is not initialized
I would need your help if possible
B4X:
ub Process_Globals
Private fx As JFX
Private MainForm As Form
Private xui As XUI
Private ParsedData As Map
Private Label1 As Label
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
Dim xm As Xml2Map
xm.Initialize
ParsedData = xm.Parse(File.ReadString(File.DirAssets, "test.xml"))
Dim zero As Map = ParsedData.Get("0")
Label1.Text=zero
End Sub