Sub Process_Globals
Private fx As JFX
Dim parser As SaxParser
Private MainForm As Form
Private TSearch As TextField
Private TVALL As TableView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
MainForm.RootPane.LoadLayout("Principal") 'Load the layout file.
'parse the xml file
parser.Initialize
Dim in As InputStream
in = File.OpenInput(File.DirAssets, "MIC.xml")
parser.Parse(in, "Parser")
in.Close
MainForm.Show
End Sub
Sub TSearch_TextChanged (Old As String, New As String)
End Sub
Sub Parser_StartElement (Uri As String, Name As String, Attributes As Attributes)
End Sub
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
Dim Row(5) As Object
If parser.Parents.IndexOf("item") > -1 Then
If Name = "CodeMIC" Then
Row(0) = Text.ToString
Else If Name = "MarketName" Then
Row(1) = Text.ToString
Else If Name = "Country" Then
Row(2) = Text.ToString
Else If Name = "RICCode" Then
Row(3) = Text.ToString
Else If Name = "BBGCode" Then
Row(4) = Text.ToString
End If
End If
If Name = "item" Then
TVALL.Items.Add(Row)
End If
End Sub