When I run the xmlSax.
I receive this error:
java.lang.RuntimeException: Field key was declared with the wrong type.
This is what the xml file looks like from XMLBuilder
<?xml version="1.0" encoding="UTF-8"?>
-<maps>
<user profi="bob"/>
<timestamp time="date"/>
<port number="80"/>
</maps>
Could this be a problem in the xml file or the code.
Thanks as always
I receive this error:
java.lang.RuntimeException: Field key was declared with the wrong type.
B4X:
Sub sync_EndElement (Uri As String, Name As String, Text As StringBuilder)
If parser.Parents.IndexOf("maps") > -1 Then
If Name = "user" Then ' the element is user
profi = Text.ToString ' the attribute is profi
Else If Name = "timestamp" Then ' the element is timestamp
time = Text.ToString ' the attribute is profi
Else If Name = "port" Then ' the element is port
number = Text.ToString ' the attribute is number
End If
End If
If Name = "maps" Then
File.WriteString(DirName, FileName6, Text)
Log(Text.ToString)
End If
This is what the xml file looks like from XMLBuilder
<?xml version="1.0" encoding="UTF-8"?>
-<maps>
<user profi="bob"/>
<timestamp time="date"/>
<port number="80"/>
</maps>
Could this be a problem in the xml file or the code.
Thanks as always
Last edited: