I wanted to read a simple xml file. I tried xmlsax with the following code:
Sub Parser_StartElement (Uri As String, Name As String, Attributes As Attributes)
Dim idx, Caption As String
'If Name = "Node" Then ' Begin @ idx=3
'If Name = "Items" Then ' Shows nothing
'If parser.Parents.IndexOf("Items") > -1 Then ' Begin @ idx=3
idx = Attributes.GetValue2("", "idx") ' Begin @ idx=1
Caption = Attributes.GetValue2("", "Caption")
ListView1.AddSingleLine(idx & " : " & Caption)
'End If
End Sub
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
End Sub
I cannot see the first zero idx. How should I do to have that ?
Another question: Where could I find XmlSax version 10 ?
Sub Parser_StartElement (Uri As String, Name As String, Attributes As Attributes)
Dim idx, Caption As String
'If Name = "Node" Then ' Begin @ idx=3
'If Name = "Items" Then ' Shows nothing
'If parser.Parents.IndexOf("Items") > -1 Then ' Begin @ idx=3
idx = Attributes.GetValue2("", "idx") ' Begin @ idx=1
Caption = Attributes.GetValue2("", "Caption")
ListView1.AddSingleLine(idx & " : " & Caption)
'End If
End Sub
Sub Parser_EndElement (Uri As String, Name As String, Text As StringBuilder)
End Sub
I cannot see the first zero idx. How should I do to have that ?
Another question: Where could I find XmlSax version 10 ?