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 ?
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...