Hi,
I have a problem while parsing an XML.
This is what I am doing while parsing:
As you can see, I want to add the content of the XML to a List.
I works pretty well and fast until the XML gets larger than approx. 1MB
At some point I am getting this Error in the Log and the App crashes.
This is the Error-Log:
Could this be a memory issue, because adding all the custom Types to a list is too much?
I added a testproject in case someone want to have a look.
Thanks
Moosi
I have a problem while parsing an XML.
This is what I am doing while parsing:
B4X:
Private Sub Parser_StartElement (uri As String, Name As String, Attributes As Map)
If Name = "id" Then
Dim Doc As MyDoc
Doc.Initialize
DocList.Add(Name)
End If
End Sub
Private Sub Parser_EndElement (uri As String, Name As String, Text As StringBuilder)
If Parser.Parents.IndexOf("Download") > -1 Then
Dim Doc As MyDoc
Doc = DocList.Get(DocList.Size - 1) 'ref to the last Doc
Log(Name)
Select Name
Case "id"
Doc.ID = Text.ToString
End Select
End If
End Sub
As you can see, I want to add the content of the XML to a List.
I works pretty well and fast until the XML gets larger than approx. 1MB
At some point I am getting this Error in the Log and the App crashes.
This is the Error-Log:
B4X:
Application_Start
Application_Active
Application_Inactive
SignalHandler 11
Error occurred on line: 69 (Main)
Signal - 11
Stack Trace: (
"0 B4i xmlTest SignalHandler + 112",
"1 libsystem_platform.dylib 0x1b110251 _sigtramp + 16",
"2 ??? 0x0 + 0",
"3 B4i xmlTest -[B4IDebugDataOutputStream copyToBuffer:count:] + 86",
"4 B4i xmlTest -[B4IShellConnector writeObject:object:stringsCacheDisabled:] + 822",
"5 B4i xmlTest -[B4IShellConnector writeObject:object:] + 44",
"6 B4i xmlTest -[B4IShellConnector writeList:list:] + 248",
"7 B4i xmlTest -[B4IShell raiseEventImpl:method:args::] + 1306",
"8 B4i xmlTest -[B4IShellBI raiseEvent:event:params:] + 1578",
"9 B4i xmlTest __33-[B4I raiseUIEvent:event:params:]_block_invoke + 74"
)
Could this be a memory issue, because adding all the custom Types to a list is too much?
I added a testproject in case someone want to have a look.
Thanks
Moosi